Skip to content

Commit 5690630

Browse files
committed
make auto mode for GO111MODULE setting
Signed-off-by: Humble Chirammal <[email protected]>
1 parent 2f59d85 commit 5690630

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

hack/verify-all.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
set -euo pipefail
1818

1919
readonly PKG_ROOT="$(git rev-parse --show-toplevel)"
20+
go env -w GO111MODULE=auto
2021

2122
${PKG_ROOT}/hack/verify-gofmt.sh
2223
${PKG_ROOT}/hack/verify-govet.sh

hack/verify-gomod.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
set -euo pipefail
1818

1919
echo "Verifying gomod"
20-
export GO111MODULE=on
20+
go env -w GO111MODULE=auto
21+
echo "go mod init"
22+
go mod init
2123
echo "go mod tidy"
2224
go mod tidy
2325
echo "go mod vendor"

hack/verify-spelling.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ set -o errexit
1818
set -o nounset
1919
set -o pipefail
2020

21+
go env -w GO111MODULE=auto
2122
TOOL_VERSION="v0.3.4"
2223

2324
# cd to the root path
@@ -39,7 +40,7 @@ if [[ -z "$(command -v misspell)" ]]; then
3940
# perform go get in a temp dir as we are not tracking this version in a go module
4041
# if we do the go get in the repo, it will create / update a go.mod and go.sum
4142
cd "${TMP_DIR}"
42-
GO111MODULE=on GOBIN="${TMP_DIR}" go get "github.com/client9/misspell/cmd/misspell@${TOOL_VERSION}"
43+
GO111MODULE=auto GOBIN="${TMP_DIR}" go get "github.com/client9/misspell/cmd/misspell@${TOOL_VERSION}"
4344
export PATH="${TMP_DIR}:${PATH}"
4445
fi
4546
cd "${ROOT}"

0 commit comments

Comments
 (0)