From d5d48abb26ab1577e453a9be6da5701c6eefb875 Mon Sep 17 00:00:00 2001 From: Jiefeng Chen <51037443+BigCat20196@users.noreply.github.com> Date: Mon, 28 Mar 2022 10:37:10 +0800 Subject: [PATCH] [Auto release] Use the template to update readme and setup through the packaging_tools (#23695) * fix auto-ask-check bug * update comment * update comment * fix bug * Update main.py * Update main.py * Update main.py * fix changelog format for new service * fix check_pprint_name bug * Update main.py * fix check_pprint_name bug * Update main.py * Update main.py * test * test * change to azclibot * change to azure * fix push * test * update * update * test * test * reduction * update main * delete f * Update main.py Co-authored-by: Yuchao Yan --- scripts/auto_release/main.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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()