The version-sync
crate is a simple crate that will help you
remember to update the versions numbers in your README.md
file.
Add this to your Cargo.toml
:
toml
[dev-dependencies]
version-sync = "0.1"
Then create a tests/version-numbers.rs
with:
```rust
extern crate version_sync;
fn testreadmedeps() { assertmarkdowndeps_updated!("README.md"); } ```
This test will ensure that the dependencies mentioned in your
README.md
file is kept in sync with your crate version:
```
$ cargo test --test version-numbers -- --nocapture
Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
Running target/debug/deps/version_numbers-3b40b9d452dd9385
running 1 test Checking code blocks in README.md... README.md (line 10) ... ok test testreadmedeps ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ```
Here the README.md
file still references version 0.1.0, while the
version number in Cargo.toml
has been changed to 0.2.0. The test
fails and the code block with the error is shown:
``` $ cargo test --test version-numbers -- --nocapture Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs Running target/debug/deps/version_numbers-8fbc5f3b97f4ec3a
running 1 test Checking code blocks in README.md... README.md (line 10) ... expected minor version 2, found 1 in [dev-dependencies] version-sync = "0.1"
thread 'testreadmedeps' panicked at 'dependency errors in README.md', tests/version-numbers.rs:6:4
note: Run with RUST_BACKTRACE=1
for a backtrace.
test testreadmedeps ... FAILED
failures:
failures: testreadmedeps
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out
error: test failed, to rerun pass '--test version-numbers' ```
This is a changelog describing the most important changes per release.
Idential to version 0.1.2, but release under the name version-sync
.
Identical to version 0.1.1, but with better deprecation notices.
The crate will be renamed to [version-sync
][version-sync] and this
is the last release of the crate under the name check-versions
.
Version 0.1.1 is identical in functionality to version 0.1.0, except
that using the crate will trigger a deprecation warning with
instructions to use [version-sync
][version-sync] instead.
First public release with support for finding outdated version numbers
in dependencies
and dev-dependencies
.
Version-sync can be distributed according to the MIT license. Contributions will be accepted under the same license.