From 14400e77e4bcde9015a59a7c3b779b0fba2503dc Mon Sep 17 00:00:00 2001 From: Dave Protasowski Date: Thu, 4 Jun 2020 21:48:28 -0400 Subject: [PATCH] drop mod=vendor usage as that's the default with go1.14 --- hack/build.sh | 8 ++++---- hack/release.sh | 6 +++--- test/local-e2e-tests.sh | 2 +- test/presubmit-tests.sh | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/hack/build.sh b/hack/build.sh index 2e230ed75e..7e04887e75 100755 --- a/hack/build.sh +++ b/hack/build.sh @@ -130,7 +130,7 @@ source_format() { go_build() { echo "๐Ÿšง Compile" - go build -mod=vendor -ldflags "$(build_flags $(basedir))" -o kn ./cmd/... + go build -ldflags "$(build_flags $(basedir))" -o kn ./cmd/... } go_test() { @@ -270,11 +270,11 @@ cross_build() { export CGO_ENABLED=0 echo " ๐Ÿง kn-linux-amd64" - GOOS=linux GOARCH=amd64 go build -mod=vendor -ldflags "${ld_flags}" -o ./kn-linux-amd64 ./cmd/... || failed=1 + GOOS=linux GOARCH=amd64 go build -ldflags "${ld_flags}" -o ./kn-linux-amd64 ./cmd/... || failed=1 echo " ๐Ÿ kn-darwin-amd64" - GOOS=darwin GOARCH=amd64 go build -mod=vendor -ldflags "${ld_flags}" -o ./kn-darwin-amd64 ./cmd/... || failed=1 + GOOS=darwin GOARCH=amd64 go build -ldflags "${ld_flags}" -o ./kn-darwin-amd64 ./cmd/... || failed=1 echo " ๐ŸŽ  kn-windows-amd64.exe" - GOOS=windows GOARCH=amd64 go build -mod=vendor -ldflags "${ld_flags}" -o ./kn-windows-amd64.exe ./cmd/... || failed=1 + GOOS=windows GOARCH=amd64 go build -ldflags "${ld_flags}" -o ./kn-windows-amd64.exe ./cmd/... || failed=1 return ${failed} } diff --git a/hack/release.sh b/hack/release.sh index 0fac736ebc..a4be611a2a 100755 --- a/hack/release.sh +++ b/hack/release.sh @@ -30,11 +30,11 @@ function build_release() { export GO111MODULE=on export CGO_ENABLED=0 echo "๐Ÿšง ๐Ÿง Building for Linux" - GOOS=linux GOARCH=amd64 go build -mod=vendor -ldflags "${ld_flags}" -o ./kn-linux-amd64 ./cmd/... + GOOS=linux GOARCH=amd64 go build -ldflags "${ld_flags}" -o ./kn-linux-amd64 ./cmd/... echo "๐Ÿšง ๐Ÿ Building for macOS" - GOOS=darwin GOARCH=amd64 go build -mod=vendor -ldflags "${ld_flags}" -o ./kn-darwin-amd64 ./cmd/... + GOOS=darwin GOARCH=amd64 go build -ldflags "${ld_flags}" -o ./kn-darwin-amd64 ./cmd/... echo "๐Ÿšง ๐ŸŽ  Building for Windows" - GOOS=windows GOARCH=amd64 go build -mod=vendor -ldflags "${ld_flags}" -o ./kn-windows-amd64.exe ./cmd/... + GOOS=windows GOARCH=amd64 go build -ldflags "${ld_flags}" -o ./kn-windows-amd64.exe ./cmd/... echo "๐Ÿšง ๐Ÿณ Building the container image" ko resolve --strict ${KO_FLAGS} -f config/ > kn-image-location.yaml ARTIFACTS_TO_PUBLISH="kn-darwin-amd64 kn-linux-amd64 kn-windows-amd64.exe kn-image-location.yaml" diff --git a/test/local-e2e-tests.sh b/test/local-e2e-tests.sh index 8f1f7fd255..65d8e79de3 100755 --- a/test/local-e2e-tests.sh +++ b/test/local-e2e-tests.sh @@ -24,4 +24,4 @@ base=$(cd "$dir/.." && pwd) export KN_E2E_NAMESPACE=kne2etests echo "๐Ÿงช Testing" -go test -mod=vendor ${base}/test/e2e/ -test.v -tags "e2e ${E2E_TAGS}" "$@" +go test ${base}/test/e2e/ -test.v -tags "e2e ${E2E_TAGS}" "$@" diff --git a/test/presubmit-tests.sh b/test/presubmit-tests.sh index 40337d484d..bc0dacda89 100755 --- a/test/presubmit-tests.sh +++ b/test/presubmit-tests.sh @@ -53,7 +53,7 @@ function post_build_tests() { # Run the unit tests with an additional flag '-mod=vendor' to avoid # downloading the deps in unit tests CI job function unit_tests() { - report_go_test -race -mod=vendor ./... || failed=1 + report_go_test -race ./... || failed=1 } # We use the default build and integration test runners.