From c14dbbdff66ac312221853d84db20bc91c7e6d93 Mon Sep 17 00:00:00 2001 From: theSoenke Date: Wed, 4 Apr 2018 10:53:00 +0200 Subject: [PATCH] Make build fully static --- build/go_build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/go_build.sh b/build/go_build.sh index fe27383..8dd9f58 100644 --- a/build/go_build.sh +++ b/build/go_build.sh @@ -15,7 +15,7 @@ function build { name=$3 echo "build os=${goos} arch=${goarch}" > /dev/stderr - GOOS=$goos GOARCH=$goarch go build -o $bin_dir/${name} -ldflags "-X main.BUILT_AT=$CURRENT_DATE -X=main.REVISION=$REVISION -X=main.PHRASEAPP_CLIENT_VERSION=$VERSION -X=main.LIBRARY_REVISION=$LIBRARY_REVISION" . + CGO_ENABLED=0 GOOS=$goos GOARCH=$goarch go build -o $bin_dir/${name} -ldflags "-X main.BUILT_AT=$CURRENT_DATE -X=main.REVISION=$REVISION -X=main.PHRASEAPP_CLIENT_VERSION=$VERSION -X=main.LIBRARY_REVISION=$LIBRARY_REVISION -extldflags '-static'" . } build linux amd64 phraseapp_linux_amd64