mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-12 01:14:22 +00:00
updated release scripts for kustomize
This commit is contained in:
@@ -23,20 +23,37 @@ set -x
|
||||
# - Use /go as the default GOPATH because this is what the image uses
|
||||
# - Link our current directory (containing the source code) to the package location in the GOPATH
|
||||
|
||||
export PKG=k8s.io
|
||||
export REPO=kubectl
|
||||
export CMD=kustomize
|
||||
OWNER="kubernetes-sigs"
|
||||
REPO="kustomize"
|
||||
|
||||
GO_PKG_OWNER=$GOPATH/src/$PKG
|
||||
GO_PKG_OWNER=$GOPATH/src/github.com/$OWNER
|
||||
GO_PKG_PATH=$GO_PKG_OWNER/$REPO
|
||||
|
||||
mkdir -p $GO_PKG_OWNER
|
||||
ln -s $(pwd) $GO_PKG_PATH
|
||||
ln -sf $(pwd) $GO_PKG_PATH
|
||||
|
||||
# When invoked in container builder, this script runs under /workspace which is
|
||||
# not under $GOPATH, so we need to `cd` to repo under GOPATH for it to build
|
||||
cd $GO_PKG_PATH
|
||||
|
||||
/goreleaser release --config=cmd/$CMD/build/.goreleaser.yml --debug --rm-dist
|
||||
# --skip-validate
|
||||
# --snapshot --skip-publish
|
||||
|
||||
# NOTE: if snapshot is enabled, release is not published to GitHub and the build
|
||||
# is available under workspace/dist directory.
|
||||
SNAPSHOT=""
|
||||
|
||||
# parse commandline args copied from the link below
|
||||
# https://stackoverflow.com/questions/192249/how-do-i-parse-command-line-arguments-in-bash?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa
|
||||
|
||||
while [[ $# -gt 0 ]]
|
||||
do
|
||||
key="$1"
|
||||
|
||||
case $key in
|
||||
--snapshot)
|
||||
SNAPSHOT="--snapshot"
|
||||
shift # past argument
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
/goreleaser release --config=build/goreleaser.yml --rm-dist --skip-validate ${SNAPSHOT}
|
||||
|
||||
Reference in New Issue
Block a user