Crates.io | cargo-git-semver |
lib.rs | cargo-git-semver |
version | 0.6.0 |
source | src |
created_at | 2024-08-30 15:13:40.537726 |
updated_at | 2024-08-30 15:13:40.537726 |
description | automatically update package version from git tags |
homepage | |
repository | https://github.com/btel/cargo-git-semver |
max_upload_size | |
id | 1357781 |
size | 42,581 |
Cargo command to automatically update version number.
It's designated to be used with pre-commit but can be also used independently of it.
automatically bump package version in Cargo.toml to match the latest git tag
cargo git-semver bump
check whether a git tag was created f
cargo git-semver check-tags
Install pre-commit and add the following configuration to your project dir:
# .pre-commit-config.yaml
repos:
- repo: https://github.com/btel/cargo-semver-hook
rev: 0.6.0
hooks:
- id: git-semver-bump
args: ['--mode', 'pep440']
files: '^(python|src|doc|Cargo\.toml|pyproject\.toml)'
always_run: false
- id: git-semver-check-tags