Have create_release.py push the new branch automatically (#1255)
Having used this script for a while now I'm not sure there is any point if leaving this last step as a manual push.
This commit is contained in:
@@ -58,14 +58,15 @@ def main(args):
|
|||||||
branch_name = 'version_' + new_version
|
branch_name = 'version_' + new_version
|
||||||
|
|
||||||
# Create a new git branch
|
# 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
|
# Create auto-generated changes to the new git branch
|
||||||
subprocess.check_call(['git', 'add', '-u', '.'], cwd=root_dir)
|
subprocess.check_call(['git', 'add', '-u', '.'], cwd=root_dir)
|
||||||
subprocess.check_call(['git', 'commit', '-m', new_version], cwd=root_dir)
|
subprocess.check_call(['git', 'commit', '-m', new_version], cwd=root_dir)
|
||||||
|
print('New release created in branch: `%s`' % branch_name)
|
||||||
|
|
||||||
print('New relase created in branch: `%s`' % branch_name)
|
# Push new branch to origin
|
||||||
|
subprocess.check_call(['git', 'push', 'origin', branch_name], cwd=root_dir)
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user