COMMIT := $(shell git rev-list -1 HEAD) VERSION := $(shell cat ./version) GOPATH := $(shell go env GOPATH) LDFLAGS := "-X 'main.Commit=$(COMMIT)' -X 'main.Version=$(VERSION)'" ABRA := ./cmd/abra all: run install build clean run: go run -ldflags=$(LDFLAGS) $(ABRA) install: go install -ldflags=$(LDFLAGS) $(ABRA) build: go build -ldflags=$(LDFLAGS) $(ABRA) clean: rm '$(GOPATH)/bin/abra'