Skip to content
Permalink
Browse files

Drop GO111MODULE env variable (#396)

* Extract env drop changes

* Add versions to deps
  • Loading branch information
ferhatelmas authored and k8s-ci-robot committed Nov 26, 2019
1 parent b20e953 commit 482d4518ae70ec66b4fe8acff77107a6c0f6baa7
Showing with 15 additions and 18 deletions.
  1. +0 −1 .travis.yml
  2. +3 −5 hack/install-gox.sh
  3. +1 −1 hack/make-binaries.sh
  4. +1 −1 hack/run-integration-tests.sh
  5. +9 −9 hack/run-lint.sh
  6. +1 −1 hack/run-tests.sh
@@ -24,7 +24,6 @@ after_success:
- bash <(curl -s https://codecov.io/bash)
env:
global:
- GO111MODULE=on
- secure: Ly5oLE9sC7NDvwyZEzOi8gPeHdu3NTP2OuDa8BOUngAanXhaEInzBJ+Pod+TIKFzpope4/z8idMN3rZfPV5LcXzhufk82LSpYlGhZgFDYajvv3eNN20arZQf4kjohd5U2aY1XrYgrgBbodv7dCLnitxotO65tTzQN5xh6evwW6Ji2Em7t42kvz9VHj2nptWKsciQEr6KNb2xDJ7PSvFKdPKq0q3Vuy7PFToZvNbsk+FBLSjYpAHG1KrlyX/WiM1mLu7jCJ4yuPx4n9+CM5Zzycbc/6mrs8ZiR+myyaCMzh6pEltdR0vzSlFIl2TJvUwzTUyTXcZsQ/ENa1ZdOkQwI4jpV3IDTQ6AlMRtBSbL5/uSOvHYs1HBYTbJJeZLiMjru9SM6D9AUW9HRr0JQGeQFsPE/4mzl39Xgl+3GE4+6sfNiaurpvgNArQNBAs2nZ0V3myiDoSG/sAL/2YzXHiG0HVhVk65P33d9SevJjBJRTobhRf4Lt0lT2IO6XF/4kQIvMnaCPQRS1X5tMIHFeTzn1dwrFiZqd1Sbwq5cd8H25nt1XnXsCTgRegJPNUxqRHnDpR5M3HRiW+TmjJIte7Y6exCihonM3afj3rsu3Q/ePwj7ckzgq8CP2yJ//Sxu4FH65LGQ/2bHJUneKL33Uq1W68c+qtKWMGLB4LNRGJVZkc=
- secure: o6ZTdC1H4elXUrqt8XFfV7zuN9mWjQcV5iMicyG7TU/Fn8HIOluzRYPNgmdtuUpLYaQ7KD1t79+QNwuWtQOOHO/eQJ2/LCwO6cSVfxa6sM560r6qOtXraJugq0sCjOY8mNcwo7toY8vtf8yHa1an4L8CSm0SkH0h2EaBE0SE+Vfmb0T0RD/5f2i0Ni8Vn9QLe2P32CRT8VWhFNs+rqj1VwpspDjwa/X+R44RBgLmf61bZQpW5bKauLTR/JrXejppkSXRRqYFDokYTbAVOZbTacwqj7b4D+H6tUb8PaG6wMu5GLe1/rLwREn49cWA3LLX/U7wcUqbIW9jYYFRjt4Cs4YFZXIsaqhAcBcitajFXiZsOdYgHnIHNR4C86oH/dM5UjVSXcpuAw8xcJ4AAEaF3EE3C+bfWZZBHbmfdF1mDbezuTKGynzsQs6i9tlOlrgL9KVsj4YThPqk8Mfa3UOHSG6dOKVqxECPb5voSzKQvRyrzPVjONgmuHf4r/7E8ur1hsXuZGnaVphWTG+fPX4Sdiuo2kn1pOCLt1C8aXqsDpKcnzBjm1yeV8m7jIOBDhPm0mrGHjiCix7NqgxUPuAwLC1zIAXIKyAIpJzig+WlQC6gFu/7zlm0qrowxLImX4seb4rWp90OFcutek0NEVy1BO2LNn4TspaeTWkqD9vR4yQ=
deploy:
@@ -24,12 +24,10 @@ cleanup() {
trap cleanup EXIT

install_gox() {
gobin="$(go env GOPATH)/bin"
cd "${scratch_dir}"
env GOPATH="${scratch_dir}" \
GO111MODULE=off \
GOBIN="${gobin}" \
go get github.com/mitchellh/gox
go mod init foo
go get github.com/mitchellh/gox@v1.0.1
cd -
}

ensure_gox() {
@@ -37,7 +37,7 @@ git_rev="${SHORT_SHA:-$(git rev-parse --short HEAD)}"
git_tag="${TAG_NAME:-$(git describe --tags --dirty --always)}"
echo >&2 "(Stamping with git tag=${git_tag} rev=${git_rev})"

env GO111MODULE=on CGO_ENABLED=0 gox -osarch="${OSARCH:-$supported_platforms}" \
env CGO_ENABLED=0 gox -osarch="${OSARCH:-$supported_platforms}" \
-tags netgo \
-mod readonly \
-ldflags="-w -X ${version_pkg}.gitCommit=${git_rev} \
@@ -46,4 +46,4 @@ fi
KREW_BINARY="${krew_binary_realpath}"
export KREW_BINARY

GO111MODULE=on go test sigs.k8s.io/krew/integration_test
go test sigs.k8s.io/krew/integration_test
@@ -27,16 +27,16 @@ if ! [[ -x "$gopath/bin/golangci-lint" ]]; then
fi

# configured by .golangci.yml
GO111MODULE=on "$gopath/bin/golangci-lint" run
"$gopath/bin/golangci-lint" run

install_impi() {
impi_dir="$(mktemp -d)"
trap 'rm -rf -- ${impi_dir}' EXIT

GOPATH="${impi_dir}" \
GO111MODULE=off \
GOBIN="${gopath}/bin" \
go get github.com/pavius/impi/cmd/impi
cd "${impi_dir}"
go mod init foo
go get github.com/pavius/impi/cmd/impi@c1cbdcb
cd -
}

# install impi that ensures import grouping is done consistently
@@ -51,10 +51,10 @@ install_shfmt() {
shfmt_dir="$(mktemp -d)"
trap 'rm -rf -- ${shfmt_dir}' EXIT

GOPATH="${shfmt_dir}" \
GO111MODULE=off \
GOBIN="${gopath}/bin" \
go get mvdan.cc/sh/cmd/shfmt
cd "${shfmt_dir}"
go mod init foo
go get mvdan.cc/sh/cmd/shfmt@v2.6.4
cd -
}

# install shfmt that ensures consistent format in shell scripts
@@ -44,7 +44,7 @@ print_with_color "$color_blue" 'Running gofmt'
"$SCRIPTDIR"/verify-gofmt.sh

print_with_color "$color_blue" 'Running tests'
GO111MODULE=on go test -short -race sigs.k8s.io/krew/...
go test -short -race sigs.k8s.io/krew/...

print_with_color "$color_blue" 'Running linter'
"$SCRIPTDIR"/run-lint.sh

0 comments on commit 482d451

Please sign in to comment.
You can’t perform that action at this time.