Skip to content

Commit

Permalink
drop mod=vendor usage as that's the default with go1.14
Browse files Browse the repository at this point in the history
  • Loading branch information
dprotaso committed Jun 5, 2020
1 parent b7bc399 commit 14400e7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions hack/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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}
}
Expand Down
6 changes: 3 additions & 3 deletions hack/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion test/local-e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}" "$@"
2 changes: 1 addition & 1 deletion test/presubmit-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 14400e7

Please sign in to comment.