From b07415ebb89b06319073452f8145e3b988a299cb Mon Sep 17 00:00:00 2001 From: Roman Gershman Date: Wed, 27 Jul 2022 10:51:18 +0300 Subject: [PATCH] fix(server): add gitsha to version output. (#217) This closes #202. In addition, update helio dependency. --- helio | 2 +- src/server/dfly_main.cc | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/helio b/helio index 8a6e927..971b1bb 160000 --- a/helio +++ b/helio @@ -1 +1 @@ -Subproject commit 8a6e9279cdf7182934afdf0af7c3735ed2b7a75c +Subproject commit 971b1bbdaef78aa7dc0cb1721d04cb69627dbbe6 diff --git a/src/server/dfly_main.cc b/src/server/dfly_main.cc index 7c90760..03c0b93 100644 --- a/src/server/dfly_main.cc +++ b/src/server/dfly_main.cc @@ -184,15 +184,16 @@ Usage: dragonfly [FLAGS] config.contains_helpshort_flags = dfly::HelpshortFlags; config.normalize_filename = dfly::NormalizePaths; config.version_string = [] { - return StrCat("dragonfly ", ColoredStr(TermColor::kGreen, dfly::kGitTag), - "\nbuild time: ", dfly::kBuildTime, "\n"); + string version = StrCat(dfly::kGitTag, "-", dfly::kGitSha); + return StrCat("dragonfly ", ColoredStr(TermColor::kGreen, version), + "\nbuild time: ", ColoredStr(TermColor::kYellow, dfly::kBuildTime), "\n"); }; absl::SetFlagsUsageConfig(config); MainInitGuard guard(&argc, &argv); - LOG(INFO) << "Starting dragonfly " << GetVersion(); + LOG(INFO) << "Starting dragonfly " << GetVersion() << "-" << kGitSha; struct sigaction act; act.sa_handler = sigill_hdlr;