forked from ssup2/kpexec
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
25 lines (20 loc) · 788 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
.PHONY: all
all: test install image
.PHONY: install
install:
CGO_ENABLED=0 GO111MODULE=on go build -a -ldflags="-X 'github.com/ssup2/kpexec/pkg/cmd/kpexec.version=latest'" -o ${GOBIN}/kpexec ./cmd/kpexec
CGO_ENABLED=0 GO111MODULE=on go build -a -ldflags="-X 'github.com/ssup2/kpexec/pkg/cmd/kpexec.version=latest' -X 'github.com/ssup2/kpexec/pkg/cmd/kpexec.build=kubectlPlugin'" -o ${GOBIN}/kubectl-pexec ./cmd/kpexec
.PHONY: image
image:
docker build --build-arg VERSION=latest -f Dockerfile-cnsenter -t ssup2/cnsenter:latest .
docker build --build-arg VERSION=latest -f Dockerfile-cnsenter-tools -t ssup2/cnsenter-tools:latest .
# goreleaser version 0.184.0
.PHONY: release
release:
goreleaser --rm-dist
.PHONY: clean
clean:
rm -f kpexec
.PHONY: test
test:
go test -v ./...