Skip to content

Commit

Permalink
Disable Go Modules in scripts used by travis (and pre-push hook)
Browse files Browse the repository at this point in the history
  • Loading branch information
oxddr committed Mar 3, 2020
1 parent a9e6337 commit 81d1100
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion _hook/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

set -euo pipefail

GIT_ROOT=$(dirname "${BASH_SOURCE[0]}")/../../
GIT_ROOT=$(dirname "${BASH_SOURCE[0]}")/../

cd "${GIT_ROOT}" || exit 1

Expand Down
2 changes: 1 addition & 1 deletion verify/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ find_test_dirs() {
)
}

go test $(find_test_dirs)
GO111MODULE=off go test $(find_test_dirs)
16 changes: 8 additions & 8 deletions verify/verify-golint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@ KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
cd "${KUBE_ROOT}"

GOLINT=${GOLINT:-"golint"}
PACKAGES=($(go list ./... | grep -v /vendor/))
PACKAGES=($(GO111MODULE=off go list ./... | grep -v /vendor/))
bad_files=()
for package in "${PACKAGES[@]}"; do
out=$("${GOLINT}" -min_confidence=0.9 "${package}")
if [[ -n "${out}" ]]; then
bad_files+=("${out}")
fi
out=$("${GOLINT}" -min_confidence=0.9 "${package}")
if [[ -n "${out}" ]]; then
bad_files+=("${out}")
fi
done
if [[ "${#bad_files[@]}" -ne 0 ]]; then
echo "!!! '$GOLINT' problems: "
echo "${bad_files[@]}"
exit 1
echo "!!! '$GOLINT' problems: "
echo "${bad_files[@]}"
exit 1
fi

# ex: ts=2 sw=2 et filetype=sh

0 comments on commit 81d1100

Please sign in to comment.