Skip to content

Commit

Permalink
Merge pull request #2 from liggitt/build-release
Browse files Browse the repository at this point in the history
Add build-release make target
  • Loading branch information
k8s-ci-robot authored Dec 3, 2020
2 parents 1528cd8 + 6a9ffb7 commit 8e6a4fa
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ default: build
build: check_go_version
go build -o ./bin/kubectl-check-ownerreferences $(shell ./build/print-ldflags.sh) ./

build-release: check_go_version
rm -fr ./bin
mkdir -p ./bin/darwin/amd64
mkdir -p ./bin/linux/amd64
GOOS=darwin GOARCH=amd64 go build -trimpath -o ./bin/darwin/amd64/kubectl-check-ownerreferences $(shell ./build/print-ldflags.sh) ./
GOOS=linux GOARCH=amd64 go build -trimpath -o ./bin/linux/amd64/kubectl-check-ownerreferences $(shell ./build/print-ldflags.sh) ./
tar -cvzf ./bin/kubectl-check-ownerreferences-darwin-amd64.tar.gz LICENSE -C ./bin/darwin/amd64 kubectl-check-ownerreferences
tar -cvzf ./bin/kubectl-check-ownerreferences-linux-amd64.tar.gz LICENSE -C ./bin/linux/amd64 kubectl-check-ownerreferences

install: check_go_version
go install $(shell ./build/print-ldflags.sh) ./

Expand Down

0 comments on commit 8e6a4fa

Please sign in to comment.