Skip to content

Commit

Permalink
[Auto release] Use the template to update readme and setup through th…
Browse files Browse the repository at this point in the history
…e 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 <[email protected]>
  • Loading branch information
BigCat20196 and msyyc authored Mar 28, 2022
1 parent e24b848 commit d5d48ab
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion scripts/auto_release/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)):
Expand All @@ -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()

Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit d5d48ab

Please sign in to comment.