Add install and clean rules to Makefile

This commit is contained in:
knoflook 2021-07-15 14:19:05 +02:00
parent a78bb9123a
commit aa8db280e5

View File

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