From 01defb0754b10e74ecd3923e1758bf0f0897e856 Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Wed, 27 Mar 2024 15:30:56 +0000 Subject: [PATCH 1/2] Bump pipeline from 1.37.2 to 1.37.2 Bumps pipeline from 1.37.2 to 1.37.2. Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- scripts/build.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/build.sh b/scripts/build.sh index dc48240..3286cfa 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -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 From b18d42f6bfe39b4394251931c02e0bb17b92836e Mon Sep 17 00:00:00 2001 From: Anthony Dahanne Date: Sat, 16 Mar 2024 00:57:08 +0000 Subject: [PATCH 2/2] Add dualarch configuration --- buildpack.toml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/buildpack.toml b/buildpack.toml index f4d4646..20ef924 100644 --- a/buildpack.toml +++ b/buildpack.toml @@ -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]]