Commit-based semantic versioning - highly configurable and tag-free.
Project description
comver
Commit-based semantic versioning - highly configurable and tag-free.
✨ Features 🚀 Quick start 📚 Documentation 🤝 Contribute 👍 Adopters 📜 Legal
Features
comver is a tool for calculating semantic versioning of your project using only commit messages - no tags required!
- Separation of concerns: versioning focuses on technical aspects, not marketing. You can now use tags solely for communication.
- Highly configurable: include only relevant commits by filtering via
message,author,email, or even commit path. - Immutable: version is calculated directly from the commit history. Tags can now be used more meaningfully (e.g., to mark a major milestone or release).
- Batteries-included: integrate with pdm, Hatch or uv.
- Verifiable: verify that a specific version was generated from a given commit chain - more resistant to tampering like dependency substitution attacks
Why?
Semantic versioning based on Git tags has a few limitations:
- Teams may avoid bumping the
majorversion due to the perceived weight of the change. Double versioning scheme; one version for technical changes, another for public releases is a viable mitigation. - Tag creation by
bots (e.g. during automated releases) lead to problems withbranch protection(see here). - Not all commits are relevant for release versions
(e.g., CI changes, bot updates, or tooling config),
yet many schemes count them in. With filtering,
comvercan exclude such noise. - Tags are mutable by default and can be re-pointed. By calculating the version
based on commits, and combining it with the commit
shaand a configchecksum, you get verifiable and reproducible results.
Quick start
[!NOTE] You can jump straight into the action and check
comvertutorials.
Installation
> pip install comver
Calculate version
[!IMPORTANT] Although written in Python, comver can be used with any programming language.
If your commits follow the Conventional Commits format, run:
> comver calculate
This will output a version string in the MAJOR.MINOR.PATCH format:
23.1.3 # Output
[!IMPORTANT] You can use plugins to integrate this versioning scheme with
pdmorhatch. More below!
Configuration
Configuration can be done either in pyproject.toml
(recommended for Python-first project) or in a separate
.comver.toml file (recommended for non-python projects):
| pyproject.toml | .comver.toml |
|---|---|
[tool.comver]
# Only commits to these paths are considered
path_includes = [
"src/*",
"pyproject.toml",
]
# Commits done by GitHub Actions bot are discarded
author_name_excludes = [
"github-actions[bot]",
]
|
# No [tool.comver] needed here
# Source only commits considered
path_includes = [
"src/*",
]
# Commits messages with [no version] are discarded
message_excludes = [
".*\[no version\].*",
".*\[skipversion\].*",
]
|
[!TIP] See suggested configuration examples here
Integrations
[!NOTE] You can use
comverwithuvby selecting the appropriate build backend, such ashatchling.
To integrate comver with pdm
or hatch add the following to
your pyproject.toml:
| PDM | Hatch |
|---|---|
# Register comver for the build process
[build-system]
build-backend = "pdm.backend"
requires = [
"pdm-backend",
"comver>=0.1.0",
]
# Setup versioning for PDM
[tool.pdm.version]
source = "call"
getter = "comver.plugin:pdm"
# Comver-specific settings
[tool.comver]
...
|
# Register comver for the build process
[build-system]
build-backend = "hatchling.build"
requires = [
"comver>=0.1.0",
"hatchling",
]
# Setup versioning for Hatchling
[tool.hatch.version]
source = "comver"
# Comver-specific settings
[tool.comver]
...
|
[!TIP] See more in the documentation
Verification
To verify that a version was produced from the same Git tree and configuration, first use the calculate command with additional flags:
comver calculate --sha --checksum
This outputs three space-separated values:
<VERSION> <SHA> <CHECKSUM>
[!TIP] Append
--format=jsonfor machine-friendly output
Before the next release provide these values to the comver verify
to ensure the version was previously generated from the
same codebase and config:
comver verify <VERSION> <SHA> <CHECKSUM>
If inconsistencies are found, you'll receive feedback, for example:
Provided checksum and the checksum of configuration do not match.
[!TIP] Explore verification workflows in the tutorials
Contribute
We welcome your contributions! Start here:
Legal
- This project is licensed under the Apache 2.0 License - see the LICENSE file for details.
- This project is copyrighted by open-nudge - the appropriate copyright notice is included in each file.
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 comver-1.0.0.tar.gz.
File metadata
- Download URL: comver-1.0.0.tar.gz
- Upload date:
- Size: 25.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7cd1a7a01bfe2bd4c870d4e14174f92314f6a57de3920828d65d79d777b8a819
|
|
| MD5 |
ea729403382ad48f7cd911e5ff34fa4b
|
|
| BLAKE2b-256 |
198e9208ce99fc4f9a2dbe7a2d804c7895d792d6ecd52a41efc2bd5c13ef794a
|
Provenance
The following attestation bundles were made for comver-1.0.0.tar.gz:
Publisher:
release.yml on open-nudge/comver
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
comver-1.0.0.tar.gz -
Subject digest:
7cd1a7a01bfe2bd4c870d4e14174f92314f6a57de3920828d65d79d777b8a819 - Sigstore transparency entry: 992686090
- Sigstore integration time:
-
Permalink:
open-nudge/comver@62574ebde590a5767e9e9da5df2b56967db69b16 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/open-nudge
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@62574ebde590a5767e9e9da5df2b56967db69b16 -
Trigger Event:
release
-
Statement type:
File details
Details for the file comver-1.0.0-py3-none-any.whl.
File metadata
- Download URL: comver-1.0.0-py3-none-any.whl
- Upload date:
- Size: 22.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53e34928a8a431cd57aa515aa49fc1ebbbeda24537e138eea25672833ad4f663
|
|
| MD5 |
53904635e9376ffd45dcb1f53e2f64e5
|
|
| BLAKE2b-256 |
e146d02156542da4d4c5f22cb46d49e49ff64ffad7fcd3d3bedbadc1f68816f7
|
Provenance
The following attestation bundles were made for comver-1.0.0-py3-none-any.whl:
Publisher:
release.yml on open-nudge/comver
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
comver-1.0.0-py3-none-any.whl -
Subject digest:
53e34928a8a431cd57aa515aa49fc1ebbbeda24537e138eea25672833ad4f663 - Sigstore transparency entry: 992686094
- Sigstore integration time:
-
Permalink:
open-nudge/comver@62574ebde590a5767e9e9da5df2b56967db69b16 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/open-nudge
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@62574ebde590a5767e9e9da5df2b56967db69b16 -
Trigger Event:
release
-
Statement type: