Skip to content

Commit d5d48ab

Browse files
BigCat20196msyyc
andauthored
[Auto release] Use the template to update readme and setup through the packaging_tools (Azure#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 <yuchaoyan@microsoft.com>
1 parent e24b848 commit d5d48ab

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

scripts/auto_release/main.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ def prepare_branch(self):
239239
# self.prepare_branch_with_base_branch()
240240

241241
def check_sdk_readme(self):
242-
sdk_readme = str(Path(f'sdk/{self.sdk_folder}/{self.package_name}/README.md'))
242+
sdk_readme = str(Path(f'sdk/{self.sdk_folder}/azure-mgmt-{self.package_name}/README.md'))
243243

244244
def edit_sdk_readme(content: List[str]):
245245
for i in range(0, len(content)):
@@ -257,6 +257,13 @@ def edit_sdk_setup(content: List[str]):
257257

258258
modify_file(str(Path(self.sdk_code_path()) / 'setup.py'), edit_sdk_setup)
259259

260+
# Use the template to update readme and setup by packaging_tools
261+
@return_origin_path
262+
def check_file_with_packaging_tool(self):
263+
os.chdir(Path(f'sdk/{self.sdk_folder}'))
264+
print_check(f'python -m packaging_tools --build-conf azure-mgmt-{self.package_name}')
265+
log('packaging_tools --build-conf successfully ')
266+
260267
def check_pprint_name(self):
261268
pprint_name = self.package_name.capitalize()
262269

@@ -402,7 +409,9 @@ def check_ci_file(self):
402409
self.check_ci_file_proc('azure-mgmt-core>=1.3.0,<2.0.0')
403410

404411
def check_file(self):
412+
self.check_file_with_packaging_tool()
405413
self.check_pprint_name()
414+
self.check_sdk_readme()
406415
self.check_sdk_setup()
407416
self.check_version()
408417
self.check_changelog_file()

0 commit comments

Comments
 (0)