Merge pull request #13879 from spowelljr/goInstall

Replace go get with go install
pull/13883/head
Steven Powell 2022-03-30 09:51:51 -07:00 committed by GitHub
commit eefea47989
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 25 deletions

View File

@ -28,21 +28,10 @@ function cleanup_token() {
}
trap cleanup_token EXIT
install_release_notes_helper() {
release_notes_workdir="$(mktemp -d)"
trap 'rm -rf -- ${release_notes_workdir}' RETURN
# See https://stackoverflow.com/questions/56842385/using-go-get-to-download-binaries-without-adding-them-to-go-mod for this workaround
cd "${release_notes_workdir}"
go mod init release-notes
GOBIN="$DIR" go get github.com/corneliusweig/release-notes
GOBIN="$DIR" go get github.com/google/pullsheet
cd -
}
if ! [[ -x "${DIR}/release-notes" ]] || ! [[ -x "${DIR}/pullsheet" ]]; then
echo >&2 'Installing release-notes'
install_release_notes_helper
go install github.com/corneliusweig/release-notes@latest
go install github.com/google/pullsheet@latest
fi
git pull https://github.com/kubernetes/minikube.git master --tags

View File

@ -18,20 +18,9 @@ set -eu -o pipefail
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
install_pullsheet() {
pullsheet_workdir="$(mktemp -d)"
trap 'rm -rf -- ${pullsheet_workdir}' RETURN
# See https://stackoverflow.com/questions/56842385/using-go-get-to-download-binaries-without-adding-them-to-go-mod for this workaround
cd "${pullsheet_workdir}"
go mod init ps
GOBIN="$DIR" go get github.com/google/pullsheet
cd -
}
if ! [[ -x "${DIR}/pullsheet" ]]; then
echo >&2 'Installing pullsheet'
install_pullsheet
go install github.com/google/pullsheet@latest
fi
git fetch --tags -f