1 unstable release

Uses old Rust 2015

0.6.0 Aug 30, 2024

#310 in Cargo plugins

MIT/Apache

20KB
438 lines

cargo git-semver

Cargo command to automatically update version number.

Usage

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
    

pre-commit configuration

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

Dependencies

~15–26MB
~466K SLoC