aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 10 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 1f75f76..a1d58fc 100644
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,18 @@
.PHONY: all test
+COMMIT := $(shell git rev-parse --short HEAD)
+TD_COMMIT := "8517026415e75a8eec567774072cbbbbb52376c1"
+VERSION := "v2.0.0-dev"
+MAKEOPTS := "-j4"
+
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
+ go test -v ./config ./ ./telegram ./xmpp ./xmpp/gateway ./persistence ./telegram/formatter ./badger
lint:
$(GOPATH)/bin/golint ./...
+
+build_indocker:
+ docker build --build-arg "TD_COMMIT=${TD_COMMIT}" --build-arg "VERSION=${VERSION}" --build-arg "MAKEOPTS=${MAKEOPTS}" --output=release --target binaries .