Display current branch and version on the footer #10

Merged
blek merged 6 commits from display-version into 0.2-dev 2023-10-29 10:48:35 +01:00
2 changed files with 2 additions and 1 deletions
Showing only changes of commit 99807b9722 - Show all commits

View File

@ -7,6 +7,7 @@ services:
networks:
bfile:
volumes:
- './.git:/opt/code/.git'
- './filed:/opt/code'
- './filed/config:/etc/filed'
- '/opt/code/target'

View File

@ -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}");