Include git info into docker build, show git ref at version (#3829)

* ci: include .git directory into build

* p2p: include git ref into version for user agent, show git commit hash instead of last tag into log

* p2p: do not show anything after version if git commit hash is empty

* fix: user agent typo
This commit is contained in:
ardocrat
2026-05-13 21:17:26 +03:00
committed by GitHub
parent e172f490ba
commit 894d9e5551
9 changed files with 61 additions and 11 deletions
+1 -1
View File
@@ -55,7 +55,7 @@ pub fn info_strings() -> (String, String) {
format!(
"This is Grin version {}{}, built for {} by {}.",
built_info::PKG_VERSION,
built_info::GIT_VERSION.map_or_else(|| "".to_owned(), |v| format!(" (git {})", v)),
built_info::GIT_COMMIT_HASH.map_or_else(|| "".to_owned(), |v| format!(" (git {})", v)),
built_info::TARGET,
built_info::RUSTC_VERSION,
),