Skip to main content

Version numbering and git tagging for project releases

Project description

vernum

Version numbering and git tagging for project releases

To install:

sudo pip3 install vernum

What it does:

  • Maintain a file at the root of a project called simply "version" with the version number, e.g. "5.6.2"
  • Update the release file for major, minor, or patch releases - patch is the default
  • Always create and push a git tag with the version number in it

Requirements:

  • Python 3 (to run the command; your project can be anything)
  • CD to the root of the project before running it
  • Be on the branch that you use for releases (i.e. master)
  • Be fully up-to-date in git (i.e. merged, committed, and pushed)

Then run the command:

  • vernum major to update the major version level, i.e. 5.6.2 -> 6.0.0
  • vernum minor to update the minor version level, i.e. 5.6.2 -> 5.7.0
  • vernum patch to update the patch version level, i.e. 5.6.2 -> 5.6.3

Note that patch is the default so you can just say vernum for a patch release

Reference the version file within your code when it needs to know the version. For example, see setup.py in this project.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vernum-2.1.3.tar.gz (2.3 kB view hashes)

Uploaded Source

Built Distribution

vernum-2.1.3-py3-none-any.whl (4.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page