From a0df3fc8486a1d377a045da350fb1223c7d91140 Mon Sep 17 00:00:00 2001 From: Min RK Date: Thu, 7 Nov 2019 12:34:32 +0100 Subject: [PATCH] update RELEASE.md for bump2version --- RELEASE.md | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index 4a2be11..6af05f1 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -9,47 +9,51 @@ For you to follow along according to these instructions, you need: project](https://pypi.org/project/chartpress/). - To have push rights to the [chartpress GitHub repository](https://github.com/jupyterhub/chartpress). -## Technical steps to make a release +## Steps to make a release 1. Update [CHANGELOG.md](CHANGELOG.md) if it is not up to date, and verify [README.md](README.md) has an updated output of running `--help`. Make a PR to review the CHANGELOG notes. -1. Once the changelog is up to date, checkout master and make sure it is up to date. +1. Once the changelog is up to date, checkout master and make sure it is up to date and clean. - ``` + ```bash ORIGIN=${ORIGIN:-origin} # set to the canonical remote, e.g. 'upstream' if 'origin' is not the official repo git checkout master - git fetch master - git reset --hard /master + git fetch $ORIGIN master + git reset --hard $ORIGIN/master + # WARNING! This next command deletes any untracked files in the repo + git clean -xfd ``` -1. Set the `__version__` variable in [chartpress.py](chartpress.py) - appropriately and make a commit with message `release `. - -1. Create a git tag for the commit. +1. Update the version with `bump2version` (can be installed with `pip install -r requirements-dev.txt`) - ``` - git tag -a -m HEAD + ```bash + VERSION=... # e.g. 1.2.3 + bump2version --tag --new-version $VERSION patch ``` 1. Package the release - ``` - python3 setup.py bdist_wheel + + ```bash + python3 setup.py sdist bdist_wheel ``` 1. Upload it to PyPI - ``` - twine upload dist/chartpress--py3-none-any.whl + + ```bash + twine upload dist/* ``` -1. Reset the `__version__` variable in [chartpress.py](chartpress.py) - appropriately with a `.dev` appendix and make a commit with the message `back - to dev`. +1. Reset the version to the next development version with `bump2version` + + ```bash + bump2version --no-tag patch + ``` 1. Push your two commits to master along with the annotated tags referencing commits on master. ``` - git push --follow-tags master + git push --follow-tags $ORIGIN master ```