Skip to content

Commit

Permalink
Compress Binaries
Browse files Browse the repository at this point in the history
This change updates the build scripts to compress the created binaries.

Signed-off-by: Ben Hale <[email protected]>
  • Loading branch information
nebhale committed Oct 12, 2020
1 parent 88d8eda commit 3449ccc
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 3449ccc

Please sign in to comment.