Skip to main content

A simple tool to bump version number of a Python package

Project description

author:

Lele Gaifax

contact:

lele@metapensiero.it

license:

GNU General Public License version 3 or later

This is a very simple tool that I use to automatize the management of the version.txt file I usually put in my Python packages. There are tons of equivalent tools around, but none of them fullfilled my needs.

It uses the package Versio to handle different versioning schemas, with an additional simple2 scheme for versions composed simply by major.minor numbers.

Examples:

$ echo "0.0" > version.txt
0.0

$ bump_version --dry-run
Old version: 0.0
New version: 0.1

$ bump_version -n --field major
Old version: 0.0
New version: 1.0

$ echo "0.0.0.0" > version.txt
$ bump_version -f minor --scheme simple4
$ cat version.txt
0.1.0.0

$ echo "0.9" > version.txt
$ bump_version -n -f release --index 1 -s pep440
Old version: 0.9
New version: 0.10

$ bump_version -f release -i 1 -s pep440
$ cat version.txt
0.10

$ bump_version -n -f pre -i 1 -s pep440
Old version: 0.10
New version: 0.10a1

$ bump_version -n -f post -i 1 -s pep440
Old version: 0.10
New version: 0.10.post1

$ bump_version -f post -i 1 -s pep440
$ bump_version -n -f dev -i 1 -s pep440
Old version: 0.10.post1
New version: 0.10.post1.dev1

Changes

1.0 (unreleased)

  • Reimport from metapensiero.extjs.desktop

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

metapensiero.tool.bump_version-1.0.tar.gz (3.9 kB view details)

Uploaded Source

File details

Details for the file metapensiero.tool.bump_version-1.0.tar.gz.

File metadata

File hashes

Hashes for metapensiero.tool.bump_version-1.0.tar.gz
Algorithm Hash digest
SHA256 3dd6652b7003569eff62e184f48f6c913fd678c345a28642bcb8b961ea6c027b
MD5 af59baa07eee0fc88e0571b34fe1809e
BLAKE2b-256 654bcb59391580df543d577cdece36d5ac4e231f3dcf8c49d6a431de98b92354

See more details on using hashes here.

Supported by

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