Add install and clean rules to Makefile
This commit is contained in:
parent
a78bb9123a
commit
aa8db280e5
9
Makefile
9
Makefile
@ -1,5 +1,14 @@
|
|||||||
COMMIT := $(shell git rev-list -1 HEAD)
|
COMMIT := $(shell git rev-list -1 HEAD)
|
||||||
VERSION := $(shell cat ./version)
|
VERSION := $(shell cat ./version)
|
||||||
|
GOPATH := $(shell go env GOPATH)
|
||||||
|
|
||||||
|
all: run
|
||||||
|
|
||||||
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'
|
||||||
|
Reference in New Issue
Block a user