2020-12-07 14:24:15 +08:00
|
|
|
.PHONY: ke
|
2020-11-19 14:53:27 +08:00
|
|
|
|
|
|
|
BINARY="ke"
|
2021-01-14 18:46:18 +08:00
|
|
|
GOBIN=$(shell go env GOPATH)/bin
|
2020-12-07 14:24:15 +08:00
|
|
|
fmt:
|
|
|
|
gofmt -w ./pkg ./cmd
|
2020-11-27 17:20:00 +08:00
|
|
|
|
2021-01-14 22:50:19 +08:00
|
|
|
test: fmt
|
|
|
|
GO111MODULE=on go test -v ./pkg/...
|
|
|
|
|
|
|
|
install-packr2:
|
2021-01-14 18:52:48 +08:00
|
|
|
GO111MODULE=on GOPROXY=https://proxy.golang.org CGO_ENABLED=0 go get -u github.com/gobuffalo/packr/v2/packr2
|
2021-01-22 14:08:35 +08:00
|
|
|
$(GOBIN)/packr2 build -a -o ${BINARY} *.go
|
2021-01-14 22:50:19 +08:00
|
|
|
|
|
|
|
ke: install-packr2
|
2020-12-07 14:24:15 +08:00
|
|
|
|
2021-01-28 11:27:17 +08:00
|
|
|
# install KubeEye
|
2020-12-07 14:24:15 +08:00
|
|
|
install: ke
|
|
|
|
mv ${BINARY} /usr/local/bin/
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm ${BINARY}
|
|
|
|
|
2021-01-28 11:27:17 +08:00
|
|
|
# uninstall KubeEye from local computer
|
2020-12-07 14:24:15 +08:00
|
|
|
uninstall:
|
2021-01-07 15:42:50 +08:00
|
|
|
rm /usr/local/bin/${BINARY} 2> /dev/null
|