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
+3 -2
View File
@@ -95,7 +95,7 @@ impl Status {
Status {
chain: global::get_chain_type().shortname(),
protocol_version: ser::ProtocolVersion::local().into(),
user_agent: p2p::msg::USER_AGENT.to_string(),
user_agent: p2p::msg::user_agent().to_string(),
connections: connections,
tip: Tip::from_tip(current_tip),
sync_status,
@@ -465,7 +465,8 @@ impl<'de> serde::de::Deserialize<'de> for OutputPrintable {
}
if output_type.is_none()
|| commit.is_none() || spent.is_none()
|| commit.is_none()
|| spent.is_none()
|| proof_hash.is_none()
|| mmr_index.is_none()
{