feat: added version and makefile

makefile allows for package variables to be defined
This commit is contained in:
2021-07-13 23:47:47 +01:00
parent a7d748cb1f
commit a2a836c2a9
3 changed files with 10 additions and 1 deletions

5
Makefile Normal file
View File

@ -0,0 +1,5 @@
COMMIT := $(shell git rev-list -1 HEAD)
VERSION := $(shell cat ./version)
run:
go run -ldflags="-X 'main.Commit=$(COMMIT)' -X 'main.Version=$(VERSION)'" ./cmd/abra