Skip to content

Commit c753656

Browse files
committed
fix: add -buildvcs=false to go build in build.sh
1 parent a82867f commit c753656

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)