Skip to content

Commit

Permalink
Merge pull request #14 from paketo-buildpacks/compress-binaries
Browse files Browse the repository at this point in the history
Compress Binaries

Signed-off-by: Ben Hale <[email protected]>
  • Loading branch information
nebhale authored Oct 12, 2020
2 parents 88d8eda + 3449ccc commit a5e8803
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 a5e8803

Please sign in to comment.