| Crates.io | cargo-git-version-setter |
| lib.rs | cargo-git-version-setter |
| version | 0.3.0 |
| created_at | 2025-03-25 00:45:52.618247+00 |
| updated_at | 2025-03-25 10:42:12.609944+00 |
| description | Write version to one or multiple Cargo.toml in a project and create a git tag. |
| homepage | https://github.com/doheide/cargo-git-version-setter |
| repository | https://github.com/doheide/cargo-git-version-setter |
| max_upload_size | |
| id | 1604600 |
| size | 66,443 |
A command-line tool for updating versions in one or more Cargo.toml files, creating a Git tag, and committing the changes.
Cargo.toml files.Cargo.toml files.Ensure you have Rust and Cargo installed on your system. Then, install the tool using:
cargo install cargo-git-version-setter
Alternatively, you can build from source:
git clone https://github.com/yourusername/cargo-git-version-setter.git
cd cargo-git-version-setter
cargo build --release
Run the tool with a command:
cgvs [OPTIONS] <COMMAND>
fixed <FULL_VERSION> - Set a fixed version.increment <VTYPE> - Increment part of the version. When incrementing major or minor version parts, the lower version parts are set to zero.only-show - Show versions from Cargo and Git, then exit.Set a specific version for the project.
Usage:
cgvs fixed <FULL_VERSION>
Arguments:
<FULL_VERSION> - The version to set.Options:
-h, --help - Print help information.Increment a specific part of the version. When incrementing major or minor version parts, the lower version parts are reset to zero.
Usage:
cgvs increment <VTYPE>
Arguments:
<VTYPE> - The version part to increment. Possible values:
patch - Patch version for backward-compatible bug fixes.minor - Minor version for backward-compatible feature additions.major - Major version for breaking API changes.Options:
-h, --help - Print help information.Display versions from Cargo and Git, then exit without making changes.
Usage:
cgvs only-show
Options:
-h, --help - Print help information.-p, --path <PATH> - Path of the project.-c, --cargo-file-selector <CARGO_FILE_SELECTOR> - Select cargo file if multiple exist (leaf, base, or all).-s, --scan-subdirs - Scan subdirectories for Cargo.toml files.-v, --verbose - Enable debugging output.-t, --tag-message <TAG_MESSAGE> - Message when adding the tag to Git.-r, --remote <REMOTE> - Git remote name to push new commits to (default: origin).-g, --git-prefix-for-tag <GIT_PREFIX_FOR_TAG> - Prefix for the version tag (default: v).-h, --help - Show help.-V, --version - Show version.version field in all detected Cargo.toml files.chore: bump version to <new-version>).--do-push is used).To set a fixed version and create a Git tag:
cgvs fixed 2.0.0
To increment the minor version:
cgvs increment minor
To show current versions without making changes:
cgvs only-show
To scan subdirectories and apply changes:
cgvs fixed 2.0.0 --scan-subdirs
This project is licensed under the MIT License.
Feel free to submit issues or pull requests to improve this tool!