[][src]Crate version_sync

version-sync provides macros for keeping version numbers in sync with your crate version.

When making a release of a Rust project, you typically need to adjust some version numbers in your code and documentation. This crate gives you macros that covers some typical cases where version numbers need updating:

A typical configuration will use an integration test to verify that all version numbers are in sync. Create a tests/version-numbers.rs file with:

#[test]
fn test_readme_deps() {
    version_sync::assert_markdown_deps_updated!("README.md");
}

#[test]
fn test_html_root_url() {
    version_sync::assert_html_root_url_updated!("src/lib.rs");
}

When you run cargo test, your version numbers will be automatically checked.

Macros

assert_contains_regex

Assert that versions numbers are up to date via a regex.

assert_html_root_url_updated

Assert that the html_root_url attribute is up to date.

assert_markdown_deps_updated

Assert that dependencies on the current package are up to date.

Functions

check_contains_regex

Check that path contain the regular expression given by template.

check_html_root_url

Check version numbers in html_root_url attributes.

check_markdown_deps

Check dependencies in Markdown code blocks.