MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / create_git_branch

Function create_git_branch

tools/maint/create_release.py:53–67  ·  view source on GitHub ↗
(release_version, dry_run)

Source from the content-addressed store, hash-verified

51
52
53def create_git_branch(release_version, dry_run):
54 branch_name = 'version_' + release_version
55
56 # Create a new git branch from upstream/main
57 print(f'Checking out new branch {branch_name} from {GIT_REMOTE}/main')
58 subprocess.check_call(['git', 'checkout', '-b', branch_name, f'{GIT_REMOTE}/main'], cwd=root_dir)
59
60 # Create auto-generated changes to the new git branch
61 subprocess.check_call(['git', 'add', '-u', '.'], cwd=root_dir)
62 subprocess.check_call(['git', 'commit', '-m', f'Mark {release_version} as released'], cwd=root_dir)
63 print('New release created in branch: `%s`' % branch_name)
64
65 if not dry_run:
66 # Push new branch to upstream
67 subprocess.check_call(['git', 'push', GIT_REMOTE, branch_name], cwd=root_dir)
68
69
70def create_draft_release(version, base_commit):

Callers 1

mainFunction · 0.85

Calls 1

printFunction · 0.50

Tested by

no test coverage detected