Skip to main content

Language agnostic version bump tool

Project description

logo

verbm

mypy test codecov python3.9 pypi downloads

Language agnostic VERsion BuMp tool that simplifies routine version management. Its capabilities include:

  • set version, up or down specific version component
  • modify the version in the source code, make a commit, and create a tag
  • analyze git history to automatically determine which component to increment
  • support monorepos, you can manage a few versions in one repo
  • support squash commits
  • be easily customized to fit your needs!

It similar to bumpr, tbump or bump2version but it automates most of the work.

Installation

Make sure Python 3.9 or later, along with pip or pipx, is installed.

pipx install verbm

Usage

To begin, you need a configuration file. You can use verbm to generate a well documented default configuration file by running the following command:

cd /path/to/project

verbm init

It will attempt to retrieve the current version from the latest git tag, as well as the user's name and email. If these attempts are unsuccessful, it will use default placeholders instead. The current version.yml in the project is an ideal example of a default configuration file.

The basic commands are get and set:

verbm get

verbm set 0.1.3-rc

It's possible to ensure version consistency across all source files:

verbm validate --file /path/to/version.yml

Most commands support the --file option and can be executed from a different directory.

You can increment or decrement a specific component of the semantic versioning by:

verbm up patch
verbm down minor

However, the most intriguing option is to analyze the output of git log and decide which component to increment. With the following options it updates source files, creates a commit and tag, and pushes these changes to the repository with a single command:

verbm up auto --commit --tag --push

Verbm follows the conventional commit style but is slightly relaxed by default. It checks both the commit message and the description. This enables the analysis of GitHub and GitLab squash commits, which gather all commits in the description each beginning with an * asterisk symbol.

Commit tags for specific version components can be easily customized in the configuration file using regular expressions.

If your project includes multiple subprojects and you want to use separate version.yml files, it can become challenging due to the git log containing commits that affect multiple subprojects simultaneously. To address this, use the --filter argument.

verbm up auto --filter '/src/subproject/.*' '/src/common/.*'

And files that have been changed but do not match the specified regex will be excluded from the log.

Contributing

If you are not familiar with Python, I recommend create a virtual environment first, then install dev dependencies:

python3 -m venv .venv

source .venv/bin/activate

pip install -r requirements.txt

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

verbm-1.0.0.tar.gz (127.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

verbm-1.0.0-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

Details for the file verbm-1.0.0.tar.gz.

File metadata

  • Download URL: verbm-1.0.0.tar.gz
  • Upload date:
  • Size: 127.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.1

File hashes

Hashes for verbm-1.0.0.tar.gz
Algorithm Hash digest
SHA256 755ab3d1f808f333839a369e1ec35c7aec5190a412571ac34215f9eabf85416a
MD5 875c699ed6c70ee13b8af091c4f4a540
BLAKE2b-256 6c7d8e8b8f21d2cf32efd59c9c35df3123157fee041822821b61c1e6ee7d19b6

See more details on using hashes here.

File details

Details for the file verbm-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: verbm-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 17.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.1

File hashes

Hashes for verbm-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5128314b954f5c6b9c502b0ef3df328e0eeaa4bd5252b35501aed71935fb4806
MD5 42b477c1936d12cab366cc10381b1f9b
BLAKE2b-256 3a8a107398f108820cc8f7de41299bed72edb23c2e55e64609cb2a2e36d90de5

See more details on using hashes here.

Supported by

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