From 6e3a4ccb80e3aefa933990466509388cc4098d56 Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Thu, 13 Oct 2022 10:15:08 +0800 Subject: [PATCH 1/2] dev_requirement --- scripts/auto_release/main.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/scripts/auto_release/main.py b/scripts/auto_release/main.py index 71fe40ff6667..c0b70ec0a226 100644 --- a/scripts/auto_release/main.py +++ b/scripts/auto_release/main.py @@ -423,6 +423,17 @@ def check_ci_file(self): self.check_ci_file_proc(target_msrest) self.check_ci_file_proc(target_mgmt_core) + def check_dev_requirment(self): + file = Path(f'sdk/{self.sdk_folder}/azure-mgmt-{self.package_name}/dev_requirements.txt') + content = [ + "-e ../../../tools/azure-sdk-tools\n", + "-e ../../../tools/azure-devtools\n", + "../../identity/azure-identity\n" + ] + if not file.exists(): + with open(file, "w") as file_out: + file_out.writelines(content) + def check_file(self): self.check_file_with_packaging_tool() self.check_pprint_name() @@ -430,6 +441,7 @@ def check_file(self): self.check_version() self.check_changelog_file() self.check_ci_file() + self.check_dev_requirment() def sdk_code_path(self) -> str: return str(Path(f'sdk/{self.sdk_folder}/azure-mgmt-{self.package_name}')) From 6322383012fda3b435cddba32eaccfb931fdd798 Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Thu, 13 Oct 2022 10:17:31 +0800 Subject: [PATCH 2/2] code --- scripts/auto_release/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/auto_release/main.py b/scripts/auto_release/main.py index c0b70ec0a226..934c567ae843 100644 --- a/scripts/auto_release/main.py +++ b/scripts/auto_release/main.py @@ -423,7 +423,7 @@ def check_ci_file(self): self.check_ci_file_proc(target_msrest) self.check_ci_file_proc(target_mgmt_core) - def check_dev_requirment(self): + def check_dev_requirement(self): file = Path(f'sdk/{self.sdk_folder}/azure-mgmt-{self.package_name}/dev_requirements.txt') content = [ "-e ../../../tools/azure-sdk-tools\n", @@ -441,7 +441,7 @@ def check_file(self): self.check_version() self.check_changelog_file() self.check_ci_file() - self.check_dev_requirment() + self.check_dev_requirement() def sdk_code_path(self) -> str: return str(Path(f'sdk/{self.sdk_folder}/azure-mgmt-{self.package_name}'))