aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorBohdan Horbeshko <bodqhrohro@gmail.com>2023-01-18 07:42:10 +0300
committerBohdan Horbeshko <bodqhrohro@gmail.com>2023-01-18 07:42:10 +0300
commitd66f87485d2a96ad9723c537c3fd11ee27579104 (patch)
tree6bae9dd6cdb9afbd4b7dbfe04d0185856efb12e3 /Makefile
parentd3c6360e3ccb7924dd582269d33dcb27932a054e (diff)
Print commit hash
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