From 48cc5eaedb400dffb888e4eae797aeb70b62a44a Mon Sep 17 00:00:00 2001 From: Gilbert Chen Date: Fri, 3 Aug 2018 23:45:23 -0400 Subject: [PATCH] Print git commit number --- duplicacy/duplicacy_main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/duplicacy/duplicacy_main.go b/duplicacy/duplicacy_main.go index 442c73ab..4a7d8c69 100644 --- a/duplicacy/duplicacy_main.go +++ b/duplicacy/duplicacy_main.go @@ -32,6 +32,7 @@ const ( ) var ScriptEnabled bool +var GitCommit = "unofficial" func getRepositoryPreference(context *cli.Context, storageName string) (repository string, preference *duplicacy.Preference) { @@ -1992,7 +1993,7 @@ func main() { app.Name = "duplicacy" app.HelpName = "duplicacy" app.Usage = "A new generation cloud backup tool based on lock-free deduplication" - app.Version = "2.1.1" + app.Version = "2.1.1" + " (" + GitCommit + ")" // If the program is interrupted, call the RunAtError function. c := make(chan os.Signal, 1)