Skip to content

Commit 759eb6a

Browse files
committed
rename build-release to build-plugin
Signed-off-by: kaizhe <[email protected]>
1 parent 62c95ae commit 759eb6a

File tree

3 files changed

+25
-25
lines changed

3 files changed

+25
-25
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ example:
1313
build:
1414
@echo "+ $@"
1515
./scripts/build
16-
build-release:
16+
build-plugin:
1717
@echo "+ $@"
18-
./scripts/build-release
18+
./scripts/build-plugin
1919
build-image:
2020
@echo "+ $@"
2121
docker build -f container/Dockerfile -t ${IMG}:${VERSION} .

scripts/build-plugin

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/sh
2+
3+
set -eux
4+
5+
export GO111MODULE=on
6+
7+
RELEASE="v$(cat version)"
8+
9+
$GOPATH/bin/goimports -w $(find . -type f -name '*.go' -not -path "./vendor/*") || true
10+
11+
# build release for MacOS
12+
env GOOS=darwin GOARCH=amd64 go build -a -o kubectl-advise-psp
13+
14+
tar -cvzf kubectl-advise-psp_${RELEASE}_darwin_amd64.tar.gz kubectl-advise-psp LICENSE
15+
16+
rm kubectl-advise-psp
17+
18+
# build release for Linux
19+
env GOOS=linux GOARCH=amd64 go build -a -o kubectl-advise-psp
20+
21+
tar -cvzf kubectl-advise-psp_${RELEASE}_linux_amd64.tar.gz kubectl-advise-psp LICENSE
22+
23+
rm kubectl-advise-psp

scripts/build-release

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)