cargo-all 0.2.3

Manage all your crates with a single command.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// crates.io
use vergen::{Config, ShaKind};

fn main() {
	let mut config = Config::default();

	*config.git_mut().sha_kind_mut() = ShaKind::Short;

	// Disable the git version if installed from <crates.io>.
	if vergen::vergen(config.clone()).is_err() {
		*config.git_mut().enabled_mut() = false;

		println!("cargo:rustc-env=VERGEN_GIT_SHA_SHORT=crates.io");

		vergen::vergen(config).unwrap();
	}
}