Releasing#
Setting Requirements#
Your requirements are split into parts: dev
, prod
, and test
. They exist in the directory requirements
. prod
requirements are required for your app to work properly. dev
requirements are packages used to help develop this package, which include things for packaging the library and generating the changelog. test
requirements are the libraries required to run tests.
As you develop, you will likely only modify requirements/prod.txt
.
Releasing your app#
Once you have developed and tested your app, or revisions to it, you need to release new version.
Deciding the version#
First decide how to increase the version. Using semantic versioning:
Given a version number MAJOR.MINOR.PATCH, increment the:
MAJOR version when you make incompatible API changes,
MINOR version when you add functionality in a backwards-compatible manner, and
PATCH version when you make backwards-compatible bug fixes.
This is a judgement call, but here are some guidelines:
A database change should be a MINOR version bump at least.
If the PATCH version is getting above
10
, as in1.0.14
, it is acceptable to do a MINOR version.Dropping or adding support of a version of Python or another dependency should be at least a MINOR version.
Versioning and releasing#
Once you’ve decided how much of a version bump you are going to do, you will run one of three commands:
make release-patch
will automatically change the patch version, e.g. 1.1.1
to 1.1.2
.
make release-minor
will automatically change the minor version, e.g. 1.1.1
to 1.2.0
.
make release-major
will automatically change the major version, e.g. 1.1.1
to 2.0.0
.
Each of these commands do several things:
Update the
CHANGELOG.md
file with the changes made since the last version, using the Git commit messages.Increments the appropriate version number in the appropriate way.
Commits all the changes.
Creates a Git tag with the version number.
Pushes the repository and tags to the GitHub server.