From d66f87485d2a96ad9723c537c3fd11ee27579104 Mon Sep 17 00:00:00 2001 From: Bohdan Horbeshko Date: Tue, 17 Jan 2023 23:42:10 -0500 Subject: Print commit hash --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Makefile') 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 -- cgit v1.2.3