-
Notifications
You must be signed in to change notification settings - Fork 18
Making a release of mazer
To release a new version of mazer, the steps are:
- Update SPDX data
- Commit any SPDX data updates to git
- Run The Tests
- Update README.md, README.rst, and CHANGELOG.rst
- Bump the version
- Build python packages
- Upload new packages to TestPyPI
- Upload new packages to PyPI
Mazer includes data about SPDX compatible licenses. To update it's bundle data to the latest version:
make dev/spdx-update
This fetches the data from https://github.com/spdx/license-list-data and creates a condensed version of it. This should modify data/spdx_licenses.json and ansible_galaxy/data/spdx_licenses.json files.
make dev/spdx-update
does not commit the new data into git, that is the next step.
Commit the new data to git:
git commit data/spdx_licenses.json ansible_galaxy/data/spdx_licenses.json
The changes will be pushed to github when pushing the tagged release as described below.
Use 'tox' to run the tests.
tox
If they fail, stop and fix the bugs.
README.md is the info shown when viewing the mazer github page.
README.rst is used when build python packages. The info in README.rst will used in the main project description at the PyPI mazer page (https://pypi.org/project/mazer)
CHANGELOG.rst is a change log that is also used for PyPI. It's contents will be appended to the README.rst.
Update to include examples of new features, etc. This does not need to include to itemized change log notes since that should be added to CHANGELOG.rst
To verify the format of the rst is valid, install the python package 'readme_renderer'.
'readme_renderer' will add a 'check' command to setup.py. To use:
python setup.py check -r -s
Commit any changes to git.
Mazer uses 'bumpversion' to update the mazer version and to create a git tag for the new version.
See https://github.com/peritus/bumpversion for bumpversion documentation.
If current version is '0.1.0', and the changes since '0.1.0' are 'patch' level changes, to bump the version to '0.1.1':
bumpversion patch
or
make dev/bumpversion-patch
will do the following:
- Replace the '__version__' value in 'ansible_galaxy/__init__.py' with '0.1.1'
- Replace setup.py 'version' value with '0.1.1'
- Replace setup.cfg 'version' value with '0.1.1'
- commit those changes with the message "Bump version: 0.1.0 → 0.1.1"
- git tag as 'v0.1.1'
The valid options for 'bumpversion' and the corresponding make targets
bumpversion arg | example | make target |
---|---|---|
major | the 'X' in 'X.Y.Z' | make dev/bumpversion-major |
minor | the 'Y' in 'X.Y.Z' | make dev/bumpversion-minor |
patch | the 'Z' in 'X.Y.Z' | make dev/bumpversion-patch |
For an example where the version was bumped to '1.2.3' and the tag created by bumpversion is 'v1.2.3':
To push the files 'bumpversion' updated and committed:
git push origin devel
Then to push the new tag:
git push origin v1.2.3
python setup.py sdist
python setup.py bdist_wheel --universal
Using version 0.1.0 as an example:
twine upload --repository-url https://test.pypi.org/legacy/ --username ansible "dist/mazer-0.1.0.tar.gz" "dist/mazer-0.1.0-py2.py3-none-any.whl"
Using version 0.1.0 as an example:
twine upload --username ansible "dist/mazer-0.1.0.tar.gz" "dist/mazer-0.1.0-py2.py3-none-any.whl"
- Home
- Using mazer and ansible
- Plans, designs, specs, use cases
- Making a release of mazer