Have create_release.py push the new branch automatically
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.
diff --git a/scripts/create_release.py b/scripts/create_release.py
index a7438f2..418dcab 100755
--- a/scripts/create_release.py
+++ b/scripts/create_release.py
@@ -58,14 +58,15 @@
branch_name = 'version_' + new_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', 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