From 3449ccc60b4cc14869730e1c80902544a9f6ec28 Mon Sep 17 00:00:00 2001 From: Ben Hale Date: Mon, 12 Oct 2020 06:40:34 -0700 Subject: [PATCH] Compress Binaries This change updates the build scripts to compress the created binaries. Signed-off-by: Ben Hale --- scripts/build.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/scripts/build.sh b/scripts/build.sh index b4c144f..c263b70 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -2,12 +2,11 @@ set -euo pipefail -if [[ -d ../go-cache ]]; then - GOPATH=$(realpath ../go-cache) - export GOPATH -fi - GOOS="linux" go build -ldflags='-s -w' -o bin/helper github.com/paketo-buildpacks/google-stackdriver/cmd/helper GOOS="linux" go build -ldflags='-s -w' -o bin/main github.com/paketo-buildpacks/google-stackdriver/cmd/main + +strip bin/helper bin/main +upx -q -9 bin/helper bin/main + ln -fs main bin/build ln -fs main bin/detect