Skip to content

Commit

Permalink
mgmt, update codegen to 4.0.37 (#24032)
Browse files Browse the repository at this point in the history
* upgrade codegen to 4.0.37

* update script to avoid deleting hand-written samples
  • Loading branch information
weidongxu-microsoft authored Sep 10, 2021
1 parent 8e51e92 commit 2ad8567
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion eng/mgmt/automation/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ def generate(
module,
)
shutil.rmtree(os.path.join(output_dir, 'src/main'), ignore_errors = True)
shutil.rmtree(os.path.join(output_dir, 'src/samples'), ignore_errors = True)
if os.path.exists(os.path.join(output_dir, 'src/samples/README.md')):
# samples contains hand-written code
shutil.rmtree(os.path.join(output_dir, 'src/samples/java', namespace.replace('.', '/'), 'generated'), ignore_errors = True)
else:
shutil.rmtree(os.path.join(output_dir, 'src/samples'), ignore_errors = True)

if re.match(r'https?://', spec_root):
readme = urllib.parse.urljoin(spec_root, readme)
Expand Down
4 changes: 2 additions & 2 deletions eng/mgmt/automation/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
MAVEN_URL = 'https://repo1.maven.org/maven2/{group_id}/{artifact_id}/{version}/{artifact_id}-{version}.jar'

SDK_ROOT = '../../../' # related to file dir
AUTOREST_CORE_VERSION = '3.4.5'
AUTOREST_JAVA = '@autorest/[email protected].36'
AUTOREST_CORE_VERSION = '3.6.0'
AUTOREST_JAVA = '@autorest/[email protected].37'
DEFAULT_VERSION = '1.0.0-beta.1'
GROUP_ID = 'com.azure.resourcemanager'
API_SPECS_FILE = 'api-specs.yaml'
Expand Down

0 comments on commit 2ad8567

Please sign in to comment.