Skip to content

Commit 2ad8567

Browse files
mgmt, update codegen to 4.0.37 (#24032)
* upgrade codegen to 4.0.37 * update script to avoid deleting hand-written samples
1 parent 8e51e92 commit 2ad8567

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

eng/mgmt/automation/generate.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@ def generate(
4848
module,
4949
)
5050
shutil.rmtree(os.path.join(output_dir, 'src/main'), ignore_errors = True)
51-
shutil.rmtree(os.path.join(output_dir, 'src/samples'), ignore_errors = True)
51+
if os.path.exists(os.path.join(output_dir, 'src/samples/README.md')):
52+
# samples contains hand-written code
53+
shutil.rmtree(os.path.join(output_dir, 'src/samples/java', namespace.replace('.', '/'), 'generated'), ignore_errors = True)
54+
else:
55+
shutil.rmtree(os.path.join(output_dir, 'src/samples'), ignore_errors = True)
5256

5357
if re.match(r'https?://', spec_root):
5458
readme = urllib.parse.urljoin(spec_root, readme)

eng/mgmt/automation/parameters.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
MAVEN_URL = 'https://repo1.maven.org/maven2/{group_id}/{artifact_id}/{version}/{artifact_id}-{version}.jar'
1616

1717
SDK_ROOT = '../../../' # related to file dir
18-
AUTOREST_CORE_VERSION = '3.4.5'
19-
AUTOREST_JAVA = '@autorest/java@4.0.36'
18+
AUTOREST_CORE_VERSION = '3.6.0'
19+
AUTOREST_JAVA = '@autorest/java@4.0.37'
2020
DEFAULT_VERSION = '1.0.0-beta.1'
2121
GROUP_ID = 'com.azure.resourcemanager'
2222
API_SPECS_FILE = 'api-specs.yaml'

0 commit comments

Comments
 (0)