diff --git a/docs/process.md b/docs/process.md index 136b0c309f2af..e802429b6c544 100644 --- a/docs/process.md +++ b/docs/process.md @@ -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 diff --git a/tools/maint/create_release.py b/tools/maint/create_release.py index 4186373f34c43..5e3c00df54c01 100755 --- a/tools/maint/create_release.py +++ b/tools/maint/create_release.py @@ -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`? + # TODO(sbc): Maybe create the tag too return 0