aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 1f75f76..48c5d7e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,9 @@
.PHONY: all test
+COMMIT := $(shell git rev-parse --short HEAD)
+
all:
- go build -o telegabber
+ go build -ldflags "-X main.commit=${COMMIT}" -o telegabber
test:
go test -v ./config ./ ./telegram ./xmpp ./xmpp/gateway ./persistence ./telegram/formatter