versionbump
Helper tool to generate version strings based on semantic versioning rules. It provides a shell command which you can use in bash scripts and comes with Python classes which you can integrate in your code.
Installation
pip install versionbump
Usage
usage: versionbump [-h] -c CURRENT [-q] [-i]
{major,minor,patch,pre} [file [file ...]]
Arguments
-c / --current: Assume current version. (required)
-l / --label: Pre-release label.
-h / --help: Print help text and exit.
-q / --quiet: Don’t write anything to stdout.
-i / --ignore: Ignore invalid files
Increase version
$ versionbump -c 0.1.2 patch 0.1.3
Replace version in file(s)
$ cat version.txt Current version: 0.1.2 $ versionbump -c 0.1.2 minor version.txt 0.1.3 $ cat version.txt Current version: 0.1.3
If you want to replace the version string in more than one file, just pass them to versionbump aswell. Example:
$ versionbump -c 0.1.2 major file1.txt file2.txt file3.txt
Python library
VersionBump
from versionbump import VersionBump
vb = VersionBump('2.0.1')
vb.bump() ## default value: 'patch'
print vb.get() ## 2.0.2
print vb.get('patch') ## 2
FileBump
from versionbump import FileBump
fo = open('version.txt', 'r+')
fb = FileBump(fo, '2.0.1')
fb.bump() ## default value: 'patch', writes to file
print fb.get() ## 2.0.2
print fb.get('patch') ## 2
Alternatives
bumpversion by Filip Noetzel. Provides much more functionality like VCS integration.
grunt-bump by Vojta Jina. Integrates with the task runner grunt.
Metadata
Release files for versionbump 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| versionbump-1.1.1.tar.gz | 4.1 kB | Without provenance | Details for versionbump-1.1.1.tar.gz |
Release files / versionbump-1.1.1.tar.gz
| Download URL | versionbump-1.1.1.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
128611ec7dfe3bb09427d7a7a4cbb465cc870240b16d4a35daf2b7f2ddd6a6ef
|
|
BLAKE2b-256 checksum How to use checksums |
75469dbda1b10873b57f318c1e057f5be68ed7535810d1b03f6b006033f1a5a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for versionbump 1.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.