diff --git a/scripts/auto_release/main.py b/scripts/auto_release/main.py index be3277b51dba..ed36d5c9cd93 100644 --- a/scripts/auto_release/main.py +++ b/scripts/auto_release/main.py @@ -239,7 +239,7 @@ def prepare_branch(self): # self.prepare_branch_with_base_branch() def check_sdk_readme(self): - sdk_readme = str(Path(f'sdk/{self.sdk_folder}/{self.package_name}/README.md')) + sdk_readme = str(Path(f'sdk/{self.sdk_folder}/azure-mgmt-{self.package_name}/README.md')) def edit_sdk_readme(content: List[str]): for i in range(0, len(content)): @@ -257,6 +257,13 @@ def edit_sdk_setup(content: List[str]): modify_file(str(Path(self.sdk_code_path()) / 'setup.py'), edit_sdk_setup) + # Use the template to update readme and setup by packaging_tools + @return_origin_path + def check_file_with_packaging_tool(self): + os.chdir(Path(f'sdk/{self.sdk_folder}')) + print_check(f'python -m packaging_tools --build-conf azure-mgmt-{self.package_name}') + log('packaging_tools --build-conf successfully ') + def check_pprint_name(self): pprint_name = self.package_name.capitalize() @@ -402,7 +409,9 @@ def check_ci_file(self): self.check_ci_file_proc('azure-mgmt-core>=1.3.0,<2.0.0') def check_file(self): + self.check_file_with_packaging_tool() self.check_pprint_name() + self.check_sdk_readme() self.check_sdk_setup() self.check_version() self.check_changelog_file()