We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 502f473 commit be60ecbCopy full SHA for be60ecb
jcli-lib/build.rs
@@ -0,0 +1,19 @@
1
+fn main() {
2
+ let pkg_version = if let Ok(date) = std::env::var("DATE") {
3
+ format!("{}.{}", env!("CARGO_PKG_VERSION"), date)
4
+ } else {
5
+ env!("CARGO_PKG_VERSION").to_string()
6
+ };
7
+
8
+ println!("cargo:rustc-env=CARGO_PKG_VERSION={}", pkg_version);
9
10
+ let version = versionisator::Version::new(
11
+ env!("CARGO_MANIFEST_DIR"),
12
+ env!("CARGO_PKG_NAME").to_string(),
13
+ pkg_version,
14
+ );
15
16
+ println!("cargo:rustc-env=FULL_VERSION={}", version.full());
17
+ println!("cargo:rustc-env=SIMPLE_VERSION={}", version.simple());
18
+ println!("cargo:rustc-env=SOURCE_VERSION={}", version.hash());
19
+}
0 commit comments