Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions scripts/auto_release/PythonSdkLiveTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ jobs:
# create PR
export NEW_BRANCH=`sed -n '1p' $output_path/output.txt`
export TARGET_BRANCH=`sed -n '2p' $output_path/output.txt`
export NORMAL_GENERATION=`sed -n '3p' $output_path/output.txt`
export ISSUE_LINK=$(ISSUE_LINK)
export PIPELINE_LINK=$(PIPELINE_LINK)
export USR_NAME=$(USR_NAME)
Expand Down
8 changes: 8 additions & 0 deletions scripts/auto_release/create_auto_release_pr.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ def main():
# Add issue link on PR
api = GhApi(owner='Azure', repo='azure-sdk-for-python', token=os.getenv('UPDATE_TOKEN'))
api.issues.create_comment(issue_number=pr_number, body='issue link:{}'.format(os.getenv('ISSUE_LINK')))

# Check whether generate normally
if 'False' in os.getenv('NORMAL_GENERATION'):
api_request = GhApi(owner='Azure', repo='sdk-release-request', token=os.getenv('USR_TOKEN'))
link = os.getenv('ISSUE_LINK')
issue_number = link.split('/')[-1]
api_request.issues.add_labels(issue_number=int(issue_number), labels=['base-branch-attention'])


if __name__ == '__main__':
main()
5 changes: 4 additions & 1 deletion scripts/auto_release/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
BRANCH_BASE = ''
OUT_PATH = ''
NEW_BRANCH = ''
NORMAL_GENERATION = True

_LOG = logging.getLogger()

Expand Down Expand Up @@ -166,6 +167,8 @@ def edit_changelog(add_content):
list_out = [list_in[0], '\n']
date = time.localtime(time.time())
list_out.append('## {} ({}-{:02d}-{:02d})\n\n'.format(VERSION_NEW, date.tm_year, date.tm_mon, date.tm_mday))
if '0.0.0' == VERSION_NEW:
NORMAL_GENERATION = False
for line in add_content:
list_out.append(line + '\n')
list_out.extend(list_in[1:])
Expand Down Expand Up @@ -459,4 +462,4 @@ def main():
my_print(e)
else:
with open(f'{OUT_PATH}/output.txt', 'w') as file_out:
file_out.writelines([f'{NEW_BRANCH}\n', "main" if TRACK == '2' else 'release/v3'])
file_out.writelines([f'{NEW_BRANCH}\n', "main\n" if TRACK == '2' else 'release/v3\n', str(NORMAL_GENERATION)])