Compare commits
2 Commits
8d5d739568
...
99807b9722
Author | SHA1 | Date |
---|---|---|
blek | 99807b9722 | |
blek | 32375127a9 |
|
@ -7,6 +7,7 @@ services:
|
|||
networks:
|
||||
bfile:
|
||||
volumes:
|
||||
- './.git:/opt/code/.git'
|
||||
- './filed:/opt/code'
|
||||
- './filed/config:/etc/filed'
|
||||
- '/opt/code/target'
|
||||
|
|
|
@ -22,6 +22,11 @@ fn system(cmd: &str, args: &[&str]) -> String {
|
|||
.args(args)
|
||||
.output()
|
||||
.unwrap();
|
||||
|
||||
if out.stderr.len() != 0 {
|
||||
panic!("Got this while running {cmd} with \"{}\": {}", args.join(" "), String::from_utf8(out.stderr).unwrap())
|
||||
}
|
||||
|
||||
String::from_utf8(out.stdout).unwrap()
|
||||
}
|
||||
|
||||
|
@ -69,7 +74,7 @@ fn main() {
|
|||
});
|
||||
|
||||
let commit = system("git", &["rev-parse", "HEAD"]);
|
||||
let branch = system("git", &["rev-parse", "--abbrev-rev", "HEAD"]);
|
||||
let branch = system("git", &["rev-parse", "--abbrev-ref", "HEAD"]);
|
||||
|
||||
println!("cargo:rustc-env=COMMIT_HASH={commit}");
|
||||
println!("cargo:rustc-env=COMMIT_BRANCH={branch}");
|
||||
|
|
Loading…
Reference in New Issue