Skip to content

Commit

Permalink
Merge pull request #6213 from kaitoii11/go-install
Browse files Browse the repository at this point in the history
🌱 Update kustomize and use go install insted of go get
  • Loading branch information
k8s-ci-robot authored Feb 28, 2022
2 parents 56d99d7 + 790e4e5 commit f42bf51
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ endif
# Binaries.
#
# Note: Need to use abspath so we can invoke these from subdirectories
KUSTOMIZE_VER := v4.4.1
KUSTOMIZE_VER := v4.5.2
KUSTOMIZE_BIN := kustomize
KUSTOMIZE := $(abspath $(TOOLS_BIN_DIR)/$(KUSTOMIZE_BIN)-$(KUSTOMIZE_VER))
KUSTOMIZE_PKG := sigs.k8s.io/kustomize/kustomize/v4
Expand Down
13 changes: 1 addition & 12 deletions scripts/go_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,9 @@ if [ -z "${GOBIN}" ]; then
exit 1
fi

tmp_dir=$(mktemp -d -t goinstall_XXXXXXXXXX)
function clean {
rm -rf "${tmp_dir}"
}
trap clean EXIT

rm "${GOBIN}/${2}"* || true

cd "${tmp_dir}"

# create a new module in the tmp directory
go mod init fake/mod

# install the golang module specified as the first argument
go get -tags tools "${1}@${3}"
go install -tags tools "${1}@${3}"
mv "${GOBIN}/${2}" "${GOBIN}/${2}-${3}"
ln -sf "${GOBIN}/${2}-${3}" "${GOBIN}/${2}"

0 comments on commit f42bf51

Please sign in to comment.