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 502bc37 commit 2ba2d7a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ How:
name release. Running this
[`scripts/create_release.py`][create_release_emsdk] script will update
[emscripten-releases-tags.json][emscripten_releases_tags], adding a new
version. The script will create a new git branch that can be uploaded as a
PR. An example of this PR is emscripten-core/emsdk#1071.
version. The script will create a new local git branch and push it up to
``origin``. An example of this PR is emscripten-core/emsdk#1071.
1. [Tag][emsdk_tags] the `emsdk` repo with the new version number, on the commit
that does the update, after it lands on main.
1. [Tag][emscripten_tags] the `emscripten` repo with the new version number, on
Expand Down
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 2ba2d7a

Please sign in to comment.