Skip to main content

Simple semantic-version bumper in python that works.

Project description

Current version: 0.4.0

Compatible with Python >=2.7

BumpyTrack

Bumping the (semantic) version of your software every time a release is done can be a tedious task, if you:

  • Have the version written in various files, e.g. setup.py or a dedicated version file.
  • Manage versioning with tags in GIT.

This little script automates this process for you.

Say you're using git-flow and you've just merged a feature to your development branch. You can just checkout and pull it, and then do:

bumpytrack minor  # or major if you have breaking changes, or patch if it's a simple bugfix

It will:

  • Replace the version string in all relevant files (see config below).
  • Commit those changes to GIT, taking care not to commit anything else.
  • Create a GIT tag for this new version.

Now you're free to push, merge to master and deploy!

For the above version string replacements we'll need some config. This example should be autoexplicative. Save it as .bumpytrack.yml in the root of your repository and you're good to go.

Installation

pip install bumpytrack

Then add a .bumpytrack.yml to the root of your repository and configure it like this.

Help

The script is really simple, and has a decent on-line documentation. Just do:

bumpytrack --help

Some of the available options:

  --current-version CURRENT_VERSION
                        Force current version instead using version in config
                        file.
  --new-version NEW_VERSION
                        Force new version instead using version in config
                        file.
  --git-commit          GIT: Commit files with version replacements.
  --no-git-commit
  --git-tag             GIT: Tag this reference with the new version.
  --no-git-tag
  --config-path CONFIG_PATH
                        Path to config file. Defaults to .bumpytrack.yml in
                        current directory.
  --verbose

You can also just peek at the code. Not much of it... it just adds one to some little numbers ;p

Development

Make sure you have the lastest pip and pipenv versions:

pip install --update pip pipenv

To start developing, start the environment by:

pipenv shell
pipenv install -d

This tool uses both pipenv for development and setuptools for packaging and distribution. To this date there is not a 100% community-accepted best practice so I've taken this approach. In summary:

To add an application dependency, add it in setup.py and leave it with a loose version definition. Then, just do pipenv install -e . to install the dependency. Pipenv locking mecanism will work as expected, since bumpytrack itself in in the [packages] section of Pipfile (check Pipfile.lock and you'll find the deps there).

To add a development dependency, add it to Pipfile via pipenv install -d <my-dependency>.

This way there's a single source of truth for package definition. No need to repeat the deps in setup.py and Pipfile*.

Also, dev project tasks are managed using nandilugio/pepython. See the tasks defined in tasks.py.

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

bumpytrack-0.4.0.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

bumpytrack-0.4.0-py2-none-any.whl (6.2 kB view details)

Uploaded Python 2

File details

Details for the file bumpytrack-0.4.0.tar.gz.

File metadata

  • Download URL: bumpytrack-0.4.0.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.15rc1

File hashes

Hashes for bumpytrack-0.4.0.tar.gz
Algorithm Hash digest
SHA256 26448ad3af9f12d072270c00dcb18870a205d297b953ab507987be5b34e5cf35
MD5 014dcf8e5bf5a3cc051ac4f4a2c43edf
BLAKE2b-256 7ca8977f4c68f086b94fa71b3834f2560009b34631af50673ca99cc5cdda9dfd

See more details on using hashes here.

Provenance

File details

Details for the file bumpytrack-0.4.0-py2-none-any.whl.

File metadata

  • Download URL: bumpytrack-0.4.0-py2-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.15rc1

File hashes

Hashes for bumpytrack-0.4.0-py2-none-any.whl
Algorithm Hash digest
SHA256 7c96a7fe981a19a042e7babb0ede8dd555d9bf4d7977f08961ba9fd4705bf9b1
MD5 5011875429b9a03cc5b0b8f81616a457
BLAKE2b-256 38d4466f22fef4943f5e7648e6158a2fbd465f40990a289414e7acbb784b6e47

See more details on using hashes here.

Provenance

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