summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJan Dittberner <jandd@cacert.org>2021-04-14 19:02:44 +0200
committerJan Dittberner <jandd@cacert.org>2021-04-14 19:02:44 +0200
commit975f3c083793d07d01e4c1b25d24a69da0cf74e0 (patch)
tree7d9c6feb4262d048469f50c8c1b934d109a00c7a /Makefile
parent4d87e35ec2eeb740853e8ae79a4cc5c9f565cd08 (diff)
downloadcacert-boardvoting-master.tar.gz
cacert-boardvoting-master.tar.xz
cacert-boardvoting-master.zip
Adapt Makefile and boardvoting.go to new ldflagsHEADmaster
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 73104a6..f83e998 100644
--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,12 @@
VERSION := $(shell git describe --always --dirty=-dev)
-BUILD := $(shell date --iso-8601=seconds --utc)
+COMMIT := $(shell git show-ref --hash refs/heads/master)
+DATE := $(shell date --iso-8601=seconds --utc)
GOFILES = $(shell find . -type f -name '*.go')
all: cacert-boardvoting
cacert-boardvoting: ${GOFILES}
- go build -o $@ -buildmode=pie -trimpath -x -ldflags " -s -w -X 'main.version=${VERSION}' -X 'main.build=${BUILD}'"
+ go build -o $@ -buildmode=pie -trimpath -x -ldflags " -s -w -X 'main.version=${VERSION}' -X 'main.commit=${COMMIT}' -X 'main.date=${DATE}'"
clean:
rm -f cacert-boardvoting