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

Add script to prepare release branches from develop to master #66

Merged
merged 3 commits into from
Jan 16, 2022
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
7 changes: 7 additions & 0 deletions Makefile
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ init:
notebooks:
@${PYTHON} -m jupyter ${JUPYTER_OPTION}

%:
@test -f scripts/${*}.sh
@${SHELL} scripts/${*}.sh

.PHONY: release #: Tag and deploy to PyPI.
release:
@${SHELL} scripts/release.sh
.PHONY: open
open:
@${OPEN} http://127.0.0.1:27701
23 changes: 23 additions & 0 deletions scripts/prepare-release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
# file: prepare-release.sh
# description: Prepare a release branch from develop to master.

## TODO: get package version from pyproject.toml
CURRENT_VERSION=2.2.0
## TODO: get new package version e.g. minor, major, bugfix
LATEST_VERSION=2.3.0

## TODO: ensure you're on the develop branch else fail

## Create release branch
git checkout -b "release/${LATEST_VERSION}" develop

## TODO: bump package version in pyproject.toml
## TODO: commit changes to pyproject.toml
## TODO: generate new CHANGELOG entry from commits
## TODO: commit changes to CHANGELOG

## Push branch and tags
git push origin "release/${LATEST_VERSION}"

## TODO: create PR for review
15 changes: 15 additions & 0 deletions scripts/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash
# file: release.sh
# description: Tag master branch and release to PyPI.


## TODO: ensure this is the master branch

## TODO: get package version from pyproject.toml
CURRENT_VERSION=2.3.0

## Create GitHub Release
git tag -a -m "${CURRENT_VERSION}"
git push --tags

## TODO: publish to PyPI.