Skip to content

Commit 1d7ea77

Browse files
BigCat20196msyyc
andauthored
[Auto release] fix changelog format for new service (Azure#23118)
* 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 Co-authored-by: Yuchao Yan <yuchaoyan@microsoft.com>
1 parent 81686c7 commit 1d7ea77

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

scripts/auto_release/main.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,9 @@ def edit_file_for_pprint_name(content: List[str]):
265265
content[i] = content[i].replace('MyService', pprint_name)
266266

267267
for file in os.listdir(self.sdk_code_path()):
268-
if os.path.isfile(file):
269-
modify_file(file, edit_file_for_pprint_name)
268+
file_path = str(Path(self.sdk_code_path()) / file)
269+
if os.path.isfile(file_path):
270+
modify_file(file_path, edit_file_for_pprint_name)
270271
log(f' replace \"MyService\" with \"{pprint_name}\" successfully ')
271272

272273
def get_all_files_under_package_folder(self) -> List[str]:
@@ -367,7 +368,7 @@ def edit_changelog_for_new_service(self):
367368
def edit_changelog_for_new_service_proc(content: List[str]):
368369
for i in range(0, len(content)):
369370
if '##' in content[i]:
370-
content[i] = f'## {self.next_version}({current_time()})'
371+
content[i] = f'## {self.next_version}({current_time()})\n'
371372
break
372373

373374
modify_file(str(Path(self.sdk_code_path()) / 'CHANGELOG.md'), edit_changelog_for_new_service_proc)

0 commit comments

Comments
 (0)