summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
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