summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJan Dittberner <jan@dittberner.info>2017-04-18 16:07:54 +0200
committerJan Dittberner <jan@dittberner.info>2017-04-22 00:12:32 +0200
commitbcfbad42b66aa29f85b283dc9aed362d3ff97f84 (patch)
tree27703598910f17782229c3620ee638dadff0d18a /Makefile
parent471daf12ea98aa2a7fcb11deff9697403c5dd6a5 (diff)
downloadcacert-boardvoting-bcfbad42b66aa29f85b283dc9aed362d3ff97f84.tar.gz
cacert-boardvoting-bcfbad42b66aa29f85b283dc9aed362d3ff97f84.tar.xz
cacert-boardvoting-bcfbad42b66aa29f85b283dc9aed362d3ff97f84.zip
Add version and build number output
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 11 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..857255e
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,11 @@
+VERSION := $(shell git describe --always --dirty=-dev)
+BUILD := $(shell date --iso-8601=seconds --utc)
+GOFILES := $(wildcard *.go)
+
+cacert-boardvoting: ${GOFILES}
+ go build -o $@ -ldflags "-X 'main.version=${VERSION}' -X 'main.build=${BUILD}'"
+
+clean:
+ rm -f cacert-boardvoting
+
+.PHONY: clean