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

create_release.py: Push resulting branch to origin #19827

Merged
merged 1 commit into from
Jul 10, 2023
Merged
Show file tree
Hide file tree
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
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: 5 additions & 3 deletions tools/maint/create_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,17 @@ 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)
# Push new branch to origin
subprocess.check_call(['git', 'push', 'origin', branch_name], cwd=root_dir)

# TODO(sbc): Maybe create the tag too, and even push both to `origin`?
sbc100 marked this conversation as resolved.
Show resolved Hide resolved
# TODO(sbc): Maybe create the tag too
return 0


Expand Down