aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorBohdan Horbeshko <bodqhrohro@gmail.com>2023-09-17 06:16:09 +0300
committerBohdan Horbeshko <bodqhrohro@gmail.com>2023-09-17 06:16:09 +0300
commit9dbd487dae9b5a74981873722be685d3706ab772 (patch)
treef5d5ab8fc1718a58cd5630aa6365f624a6fdbe98 /Makefile
parent7eaf28ad7c4d2bdf5aa6313503d751de90a6811c (diff)
parent282a6fc21b9626ab1bdc9c5a78162d90b7d28aa2 (diff)
Merge branch 'master' into muc
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 .