Skip to content

Commit

Permalink
create_release.py: Push resulting branch to origin
Browse files Browse the repository at this point in the history
Also, set the upstream when creating the new branch.
  • Loading branch information
sbc100 committed Jul 10, 2023
1 parent a6b8143 commit 2a539fe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tools/maint/create_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ def main():
branch_name = 'version_' + release_version

# Create a new git branch
subprocess.check_call(['git', 'checkout', '-b', branch_name], cwd=root_dir)
subprocess.check_call(['git', 'checkout', '-b', branch_name, 'origin/main'], cwd=root_dir)

# Create auto-generated changes to the new git branch
subprocess.check_call(['git', 'add', '-u', '.'], cwd=root_dir)
subprocess.check_call(['git', 'commit', '-m', f'Mark {release_version} as released'], cwd=root_dir)
print('New release created in branch: `%s`' % branch_name)

print('New relase created in branch: `%s`' % branch_name)

# TODO(sbc): Maybe create the tag too, and even push both to `origin`?
# Push new branch to origin
subprocess.check_call(['git', 'push', 'origin', branch_name], cwd=root_dir)
return 0


Expand Down

0 comments on commit 2a539fe

Please sign in to comment.