File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ function build() {
3838 if [[ -n " $metadata " ]] ; then
3939 ldflags=" -X github.com/GoogleCloudPlatform/cloud-sql-proxy/v2/cmd.metadataString=$metadata "
4040 fi
41- go build -ldflags " $ldflags " -o ./cloud-sql-proxy main.go
41+ go build -buildvcs=false - ldflags " $ldflags " -o ./cloud-sql-proxy main.go
4242}
4343
4444# # test - Runs local unit tests.
@@ -302,7 +302,7 @@ function build_image() {
302302 trap cleanup_build EXIT
303303
304304 echo " Building binary locally..."
305- CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags " -X github.com/GoogleCloudPlatform/cloud-sql-proxy/v2/cmd.metadataString=$metadata " -o cloud-sql-proxy
305+ CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -buildvcs=false - ldflags " -X github.com/GoogleCloudPlatform/cloud-sql-proxy/v2/cmd.metadataString=$metadata " -o cloud-sql-proxy
306306
307307 echo " Creating temporary Dockerfile..."
308308 cat > Dockerfile.local << EOF
You can’t perform that action at this time.
0 commit comments