aboutsummaryrefslogtreecommitdiff
path: root/cmd/sigsum_log_go
diff options
context:
space:
mode:
authorRasmus Dahlberg <rasmus.dahlberg@kau.se>2021-09-14 10:22:02 +0200
committerRasmus Dahlberg <rasmus.dahlberg@kau.se>2021-09-14 10:22:02 +0200
commit3981cdc68052c5084c28ade768b635d24242aa6d (patch)
tree99e3673a808f0e1f2d28d0eb08cf78cdb388e51e /cmd/sigsum_log_go
parent3e28061421af28fda9e193f3758475c442d91893 (diff)
added option to supply git-commit hash when compiling
Usage: ``` $ go build -ldflags="-X 'main.gitCommit=$(git rev-list -1 HEAD)'" ```
Diffstat (limited to 'cmd/sigsum_log_go')
-rw-r--r--cmd/sigsum_log_go/main.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/cmd/sigsum_log_go/main.go b/cmd/sigsum_log_go/main.go
index 6189b1d..786504d 100644
--- a/cmd/sigsum_log_go/main.go
+++ b/cmd/sigsum_log_go/main.go
@@ -37,11 +37,14 @@ var (
witnesses = flag.String("witnesses", "", "comma-separated list of trusted witness verification keys in hex")
maxRange = flag.Int64("max_range", 10, "maximum number of entries that can be retrived in a single request")
interval = flag.Duration("interval", time.Second*30, "interval used to rotate the log's cosigned STH")
+
+ gitCommit = "unknown"
)
func main() {
flag.Parse()
defer glog.Flush()
+ glog.Infof("sigsum-log-go git-commit %s", gitCommit)
// wait for clean-up before exit
var wg sync.WaitGroup