diff --git a/Makefile b/Makefile old mode 100644 new mode 100755 index 475ea62..57809b4 --- a/Makefile +++ b/Makefile @@ -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 \ No newline at end of file diff --git a/scripts/prepare-release.sh b/scripts/prepare-release.sh new file mode 100644 index 0000000..addb3b1 --- /dev/null +++ b/scripts/prepare-release.sh @@ -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 \ No newline at end of file diff --git a/scripts/release.sh b/scripts/release.sh new file mode 100644 index 0000000..a0cf023 --- /dev/null +++ b/scripts/release.sh @@ -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. \ No newline at end of file