We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 18c3949 commit c7844d5Copy full SHA for c7844d5
artiq/runtime.rs/build.rs
@@ -13,8 +13,10 @@ fn main() {
13
let dest_path = Path::new(&out_dir).join("git_info.rs");
14
let mut f = File::create(&dest_path).unwrap();
15
16
- writeln!(f, "const GIT_COMMIT: &'static str = {:?};",
17
- git_describe().unwrap()).unwrap();
+ let id = git_describe().unwrap();
+ let id = id.split("-").collect::<Vec<_>>();
18
+ let id = format!("{}+{}.{}", id[0], id[1], id[2]);
19
+ writeln!(f, "const GIT_COMMIT: &'static str = {:?};", id).unwrap();
20
21
println!("cargo:rerun-if-changed=../../.git/HEAD");
22
for entry in WalkDir::new("../../.git/refs") {
0 commit comments