Display current branch and version on the footer #10
|
@ -7,6 +7,7 @@ services:
|
|||
networks:
|
||||
bfile:
|
||||
volumes:
|
||||
- './.git:/opt/code/.git'
|
||||
- './filed:/opt/code'
|
||||
- './filed/config:/etc/filed'
|
||||
- '/opt/code/target'
|
||||
|
|
|
@ -74,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