Release packaging guidelines¶
Preparing for a new release¶
Follow the steps outlined below to prep changes in your fork:
Merge any changes from
upstream/masterinto your fork’smasterbranch.git fetch upstream git checkout master git merge upstream/master
From your fork’s
masterbranch, create a new branch for preparing the release, e.g.:git checkout -b release-prep/2.X.XUpdate
__version__inwagtailmenus/__init__.pyto reflect the new release version.Make sure
CHANGELOG.mdis updated with details of any changes since the last release.Make sure the release notes for the new version have been created / updated in
docs/source/releases/and are referenced indocs/source/releases/index.rst. Be sure to remove the ‘(alpha)’ or ‘(beta)’ from the heading in the latest release notes, as well as the ‘Wagtailmenus X.X is in the alpha stage of development’ just below.If releasing a ‘final’ version, following an ‘alpha’ or ‘beta’ release, ensure the
aorbis removed from the file name for the release, and the reference to it indocs/source/releases/index.rst.cdinto thedocsdirectory to check documentation-related stuff:cd docsCheck for and correct any spelling errors raised by sphinx:
make spellingCheck that the docs build okay, and fix any errors raised by sphinx:
make htmlCommit changes so far:
git commit -am 'Bumped version and updated release notes'Update the source translation files by running the following from the project’s root directory:
# Update source files django-admin.py makemessages -l en # Commit the changes git commit -am 'Update source translation files'
Push all outstanding changes to GitHub:
git pushSubmit your changes as a PR to the main repository via https://github.com/jazzband/wagtailmenus/compare
Packaging and pushing to PyPi¶
When satisfied with the PR for preparing the files:
From https://github.com/jazzband/wagtailmenus/pulls, merge the PR into the
masterbranch using the “merge commit” option.Locally,
cdto the project’s root directory, checkout themasterbranch, and ensure the local copy is up-to-date:source .venv/bin/activate cd ../path-to-original-repo git checkout master git pull
Ensure dependencies are up-to-date by running:
pip install -e '.[deployment]' -UCreate a new tag for the new version and push that too. Github Actions should deploy the new version directly to PyPI once it’s finished building:
git tag -a v2.X git push --tags
- Edit the release notes for the release from
https://github.com/jazzband/wagtailmenus/releases, by copying and pasting the content from
docs/releases/x.x.x.rst
Crack open a beer - you earned it!