Easy semantic versioning for projects in Git
Project description
VerNum
Version numbering and git tagging for project releases
Installation
Requires Python 3 to run the command; your project can be anything.
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
- Optionally create and push a git tag with the version number in it
Usage
Requirements:
- 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 majorto update the major version level, i.e. 5.6.2 -> 6.0.0vernum minorto update the minor version level, i.e. 5.6.2 -> 5.7.0vernum patchto 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 pyproject.toml in this project.
VerNum looks at the most recent git tag that fits the format, then increments it appropriately. It also generates the .version file.
Options:
--push-tagcreate a git tag for the version and push it--dry-runjust output the information; don't do anything
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vernum-3.1.5.tar.gz.
File metadata
- Download URL: vernum-3.1.5.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0673b24ea7cdac2015da4b131a30273e706d4acdf8994b3dfb81147bafb595e2
|
|
| MD5 |
c5e0259c9d9f5b9fc050295d0a574e0f
|
|
| BLAKE2b-256 |
84e6930e73fcc07e029492368518482e43bd77cc2e3533d36c914acbb7d829bc
|
File details
Details for the file vernum-3.1.5-py3-none-any.whl.
File metadata
- Download URL: vernum-3.1.5-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5326f35a470afd524c23e3b64d5b288e0df3aa9534064560dfa9dff3f17a93cc
|
|
| MD5 |
0f18fbf4e7c54ef9c540e472ce70cf65
|
|
| BLAKE2b-256 |
2e4fc2f33c2e9369c5f627903468da173f635a93cbb21e2ea2ebeefc8b2b3864
|