Language agnostic version bump tool
Project description
verbm
Language agnostic VERsion BuMp tool that simplifies routine version management. Its capabilities include:
setversion,upordownspecific 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
--fileoption 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
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 verbm-0.1.0.tar.gz.
File metadata
- Download URL: verbm-0.1.0.tar.gz
- Upload date:
- Size: 127.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
09eca2312b1396a0a3b70b0ffa14f0475ff570fea391e346cdc407cb26fc0c6e
|
|
| MD5 |
748ab57299cd1f88d9cd29b5ed640db4
|
|
| BLAKE2b-256 |
b0c9d7ff9525efcd74027880b91ff2bed66367698713efa1f213e749da033979
|
File details
Details for the file verbm-0.1.0-py3-none-any.whl.
File metadata
- Download URL: verbm-0.1.0-py3-none-any.whl
- Upload date:
- Size: 17.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c2f3b403245843539b38bc365e08ca92404c1a0f47e3163f152f639cf9c3f44
|
|
| MD5 |
dfb6ed29fa4faa146f1c5719ebc5db2c
|
|
| BLAKE2b-256 |
deead51a74419d2006c3a70580bd8a954b5e62557d78e0e5f616d61d004c6ab0
|