X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=Makefile;h=ddde397b2ce427b5995cce8933a426332b17aa36;hb=3b727d74f76503b1306a81318025ed7772c884c3;hp=8ccec9daa1fa3489f6d46ac19396a1ff62b8e2ad;hpb=f2f2bc47e8729548f3c10117f7f008b547c4afc5;p=safcm%2Fsafcm.git diff --git a/Makefile b/Makefile index 8ccec9d..ddde397 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,15 @@ +LDFLAGS = '\ + -X "main.versionGit=$(shell git describe --long --tags --dirty --always)" \ + -X "main.versionGo=$(shell go version)" \ +' + + all: safcm safcm: go fmt ./... cd cmd/safcm-remote && ./build.sh - go build -race ruderich.org/simon/safcm/cmd/safcm + go build -ldflags $(LDFLAGS) -race ruderich.org/simon/safcm/cmd/safcm @# For proper permissions after initial clone with a strict umask cd cmd/safcm/testdata/project && ../../../../safcm fixperms 2> /dev/null