Skip to content

Commit

Permalink
Release process tweaks (#540)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmojaki authored Oct 25, 2024
1 parent 5e9f105 commit 720bc41
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions release/prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ def update_history(new_version: str, notes: str) -> None:
generate_stubs()
print('Generated stubs.')

run_command('git', 'fetch', '--tags') # so that get_last_tag is accurate
release_notes = get_notes(version)
update_history(version, release_notes)
print('Release notes added to CHANGELOG.md.')
7 changes: 5 additions & 2 deletions release/push.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,18 @@ def create_github_release_draft(version: str, release_notes: str):
}
response = requests.post(url, json=data, headers=headers)
response.raise_for_status()
return response.json()['html_url']
release_url = response.json()['html_url']
# Publishing happens in the edit page
edit_url = release_url.replace('/releases/tag/', '/releases/edit/')
return edit_url


def commit_and_push_changes(version: str) -> None:
"""Commit and push changes to a new branch."""
branch_name = f'release/v{version}'
run_command('git', 'checkout', '-b', branch_name)
run_command('git', 'add', '.')
run_command('git', 'commit', '-m', f"'Bump version to v{version}'")
run_command('git', 'commit', '-m', f'Bump version to v{version}')
run_command('git', 'push', 'origin', branch_name)


Expand Down

0 comments on commit 720bc41

Please sign in to comment.