cargo-version-sync
Cargo subcommand for keeping the version numbers in sync with Cargo.toml
Status
Exeperimental
Installation
$ cargo install cargo-version-sync
Usage
- Add fields to
Cargo.toml
for specifying files to rewrite the version numbers bycargo version-sync
:
[[]]
= "README.md"
= [
{ = "https://deps.rs/crate/tsukuyomi/[a-z0-9\\.-]+", = "https://deps.rs/crate/tsukuyomi/{{version}}" },
]
- Run
cargo-version-sync
to rewrite version numbers:
$ cargo version-sync [--verbose] [--dry-run]
Working with custom Git hooks
[]
= "1"
= false
= ["user-hooks"]
in .cargo-husky/hooks/pre-commit
:
#!/bin/bash
if ; then
(; )
fi
if ; then
(; )
fi
Working with cargo test
in tests/version_sync.rs
:
extern crate cargo_version_sync;