Skip to content

Commit

Permalink
Merge pull request #459 from paketo-buildpacks/update/pipeline
Browse files Browse the repository at this point in the history
Bump pipeline from 1.37.2 to 1.37.2
  • Loading branch information
anthonydahanne authored Mar 27, 2024
2 parents 3aaf50a + b18d42f commit 7944296
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
10 changes: 9 additions & 1 deletion buildpack.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,16 @@ api = "0.7"
type = "Apache-2.0"
uri = "https://github.com/paketo-buildpacks/spring-boot/blob/main/LICENSE"

[[targets]]
os = "linux"
arch = "amd64"

[[targets]]
os = "linux"
arch = "arm64"

[metadata]
include-files = ["LICENSE", "NOTICE", "README.md", "bin/build", "bin/detect", "bin/helper", "bin/main", "buildpack.toml", "spring-generations.toml"]
include-files = ["LICENSE", "NOTICE", "README.md", "linux/amd64/bin/build", "linux/amd64/bin/detect", "linux/amd64/bin/main", "linux/amd64/bin/helper", "linux/arm64/bin/build", "linux/arm64/bin/detect", "linux/arm64/bin/main", "linux/arm64/bin/helper", "buildpack.toml", "spring-generations.toml"]
pre-package = "scripts/build.sh"

[[metadata.configurations]]
Expand Down
4 changes: 4 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,18 @@
set -euo pipefail

GOMOD=$(head -1 go.mod | awk '{print $2}')
GOOS="linux" go build -ldflags='-s -w' -o "linux/amd64/bin/helper" "$GOMOD/cmd/helper"
GOOS="linux" GOARCH="arm64" go build -ldflags='-s -w' -o "linux/arm64/bin/helper" "$GOMOD/cmd/helper"
GOOS="linux" go build -ldflags='-s -w' -o linux/amd64/bin/main "$GOMOD/cmd/main"
GOOS="linux" GOARCH="arm64" go build -ldflags='-s -w' -o linux/arm64/bin/main "$GOMOD/cmd/main"

if [ "${STRIP:-false}" != "false" ]; then
strip linux/amd64/bin/helper linux/arm64/bin/helper
strip linux/amd64/bin/main linux/arm64/bin/main
fi

if [ "${COMPRESS:-none}" != "none" ]; then
$COMPRESS linux/amd64/bin/helper linux/arm64/bin/helper
$COMPRESS linux/amd64/bin/main linux/arm64/bin/main
fi

Expand Down

0 comments on commit 7944296

Please sign in to comment.