Skip to content

Commit

Permalink
chore(build): add install and uninstall Makefile targets (grafana#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
slim-bean authored and sh0rez committed Aug 12, 2019
1 parent 6de170d commit eab83be
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: lint test static cross
.PHONY: lint test static install uninstall cross
VERSION := $(shell git describe --tags --dirty --always)
BIN_DIR := $(GOPATH)/bin
GOX := $(BIN_DIR)/gox
Expand All @@ -18,6 +18,12 @@ LDFLAGS := '-s -w -extldflags "-static" -X main.Version=${VERSION}'
static:
CGO_ENABLED=0 GOOS=linux go build -ldflags=${LDFLAGS} ./cmd/tk

install:
CGO_ENABLED=0 go install -ldflags=${LDFLAGS} ./cmd/tk

uninstall:
go clean -i ./cmd/tk

$(GOX):
go get -u github.com/mitchellh/gox
cross: $(GOX)
Expand Down

0 comments on commit eab83be

Please sign in to comment.