Merge pull request #25275 from hashicorp/ci/fix-go-mod-updating

don't update deps of gox in docker build and use -mod=readonly
This commit is contained in:
Alvin Huang 2020-06-17 16:25:20 -04:00 committed by GitHub
commit d4c055dea4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -36,12 +36,15 @@ fi
if ! which gox > /dev/null; then
echo "==> Installing gox..."
go get -u github.com/mitchellh/gox
go get github.com/mitchellh/gox
fi
# Instruct gox to build statically linked binaries
export CGO_ENABLED=0
# Set module download mode to readonly to not implicitly update go.mod
export GOFLAGS="-mod=readonly"
# In release mode we don't want debug information in the binary
if [[ -n "${TF_RELEASE}" ]]; then
LD_FLAGS="-s -w"