Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have create_release.py push the new branch automatically #1255

Merged
merged 1 commit into from
Jul 10, 2023
Merged
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
7 changes: 4 additions & 3 deletions scripts/create_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,15 @@ def main(args):
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


Expand Down