Skip to content

Commit

Permalink
use -mod=vendor
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitriy Kalinin committed Jan 27, 2021
1 parent 481204b commit 62034f4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions hack/build-binaries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e -x -u

export VERSION=0.7.0
export VERSION=0.7.0 # No v prefix

./hack/build.sh

Expand All @@ -18,7 +18,7 @@ mkdir -p tmp/binaries/k14s/$VERSION

# makes builds reproducible
export CGO_ENABLED=0
repro_flags="-ldflags=-buildid= -trimpath"
repro_flags="-ldflags=-buildid= -trimpath -mod=vendor"

GOOS=darwin GOARCH=amd64 go build $repro_flags \
-o darwin_amd64/terraform-provider-k14s ../../../../cmd/...
Expand Down
7 changes: 6 additions & 1 deletion hack/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@

set -e -x -u

# makes builds reproducible
export CGO_ENABLED=0
repro_flags="-ldflags=-buildid= -trimpath -mod=vendor"

go fmt ./cmd/... ./pkg/...
go mod vendor
go mod tidy
go build -o terraform-provider-k14s ./cmd/...

go build $repro_flags -o terraform-provider-k14s ./cmd/...
ls -la ./terraform-provider-k14s

echo SUCCESS

0 comments on commit 62034f4

Please sign in to comment.