-
Notifications
You must be signed in to change notification settings - Fork 60
/
Makefile
49 lines (42 loc) · 1.82 KB
/
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
COMMONBUILDARGS := CGO_ENABLED=0
.PHONY: darwin-amd64
darwin-amd64:
cd cmd/kubectl-cost && ${COMMONBUILDARGS} GOOS=darwin GOARCH=amd64 govvv build -o kubectl-cost-darwin-amd64
tar --transform 's|.*kubectl-cost-darwin-amd64|kubectl-cost|' \
-czf cmd/kubectl-cost/kubectl-cost-darwin-amd64.tar.gz \
cmd/kubectl-cost/kubectl-cost-darwin-amd64 \
LICENSE
.PHONY: darwin-arm64
darwin-arm64:
cd cmd/kubectl-cost && ${COMMONBUILDARGS} GOOS=darwin GOARCH=arm64 govvv build -o kubectl-cost-darwin-arm64
tar --transform 's|.*kubectl-cost-darwin-arm64|kubectl-cost|' \
-czf cmd/kubectl-cost/kubectl-cost-darwin-arm64.tar.gz \
cmd/kubectl-cost/kubectl-cost-darwin-arm64 \
LICENSE
.PHONY: linux-amd64
linux-amd64:
cd cmd/kubectl-cost && ${COMMONBUILDARGS} GOOS=linux GOARCH=amd64 govvv build -o kubectl-cost-linux-amd64
tar --transform 's|.*kubectl-cost-linux-amd64|kubectl-cost|' \
-czf cmd/kubectl-cost/kubectl-cost-linux-amd64.tar.gz \
cmd/kubectl-cost/kubectl-cost-linux-amd64 \
LICENSE
.PHONY: windows-amd64
windows-amd64:
cd cmd/kubectl-cost && ${COMMONBUILDARGS} GOOS=windows GOARCH=amd64 govvv build -o kubectl-cost-windows-amd64
tar --transform 's|.*kubectl-cost-windows-amd64|kubectl-cost|' \
-czf cmd/kubectl-cost/kubectl-cost-windows-amd64.tar.gz \
cmd/kubectl-cost/kubectl-cost-windows-amd64 \
LICENSE
.PHONY: release
release: darwin-amd64 darwin-arm64 linux-amd64 windows-amd64
sha256sum cmd/kubectl-cost/kubectl-cost-darwin-amd64.tar.gz
sha256sum cmd/kubectl-cost/kubectl-cost-darwin-arm64.tar.gz
sha256sum cmd/kubectl-cost/kubectl-cost-linux-amd64.tar.gz
sha256sum cmd/kubectl-cost/kubectl-cost-windows-amd64.tar.gz
.PHONY: build
build:
cd cmd/kubectl-cost && ${COMMONBUILDARGS} govvv build
.PHONY: install
install: build
chmod +x ./cmd/kubectl-cost/kubectl-cost
cp ./cmd/kubectl-cost/kubectl-cost ~/go/bin/kubectl-cost