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’s
git fetch upstream git checkout master git merge upstream/master
From your fork’s
masterbranch, create a new branch for prepping the release, e.g.:
git checkout -b release-prep/2.X.X
wagtailmenus/__init__.pyto reflect the new release version.
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 in
If releasing a ‘final’ version, following an ‘alpha’ or ‘beta’ release, ensure the
bis removed from the file name for the release, and the reference to it in
Check that the docs build okay, and fix any errors raised by sphinx:
Commit 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 oustanding changes to github:
Submit your changes as a PR to the main repo via https://github.com/rkhleics/wagtailmenus/compare
Packaging and pushing to PyPi¶
When satisfied with the PR for prepping the files:
From https://github.com/rkhleics/wagtailmenus/pulls, merge the PR into the
masterbranch using the “merge commit” option.
Locally, cd to the project’s root directory, checkout the
masterbranch, and ensure the local copy is up-to-date:
workon wagtailmenus cd ../path-to-original-repo git checkout master git pull
Ensure dependencies are up-to-date by running:
pip install -e '.[testing,docs]' -U
Push any updated translation source files to Transifex:
tx push -s -l en
Pull down updated translations from Transifex:
tx pull --a rm -r wagtailmenus/locale/en_GB/ git add *.po
For each language, convert .po files to .mo by running:
msgfmt --check-format -o wagtailmenus/locale/lang/LC_MESSAGES/django.mo wagtailmenus/locale/lang/LC_MESSAGES/django.po
Commit and push all changes so far:
git commit -am 'Pulled updated translations from Transifex and converted to .mo' git push
Create a new tag for the new version and push that too:
git tag -a v2.X.X git push --tags
Create a new source distribution and universal wheel for the new version
python setup.py sdist python setup.py bdist_wheel --universal
Install twine (if not already installed) and upload to the new distribution files to the PyPi test environment.
pip install twine twine upload dist/* -r pypitest
Test that the new test distribution installs okay:
mktmpenv pip install -i https://testpypi.python.org/pypi wagtailmenus deactivate
If all okay, push distribution files to the live PyPi:
twine upload dist/* -r pypi
Edit the release notes for the release from https://github.com/rkhleics/wagtailmenus/releases, by copying and pasting the content from
Crack open a beer - you earned it!