diff --git a/scripts/build.sh b/scripts/build.sh index a754d74..45f1b7b 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -2,11 +2,10 @@ set -euo pipefail -if [[ -d ../go-cache ]]; then - GOPATH=$(realpath ../go-cache) - export GOPATH -fi - GOOS="linux" go build -ldflags='-s -w' -o bin/main github.com/paketo-buildpacks/spring-boot-native-image/cmd/main + +strip bin/main +upx -q -9 bin/main + ln -fs main bin/build ln -fs main bin/detect