diff --git a/buildpack.toml b/buildpack.toml index bc33d83..2e4c244 100644 --- a/buildpack.toml +++ b/buildpack.toml @@ -27,8 +27,16 @@ api = "0.7" type = "Apache-2.0" uri = "https://github.com/paketo-buildpacks/ca-certificates/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"] + 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"] pre-package = "scripts/build.sh" [metatdata] diff --git a/scripts/build.sh b/scripts/build.sh index 72e1c9f..e5ad769 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -2,16 +2,20 @@ set -euo pipefail -GOOS="linux" go build -ldflags='-s -w' -o bin/main github.com/paketo-buildpacks/ca-certificates/v3/cmd/main -GOOS="linux" go build -ldflags='-s -w' -o bin/helper github.com/paketo-buildpacks/ca-certificates/v3/cmd/helper +GOOS="linux" go build -ldflags='-s -w' -o linux/amd64/bin/main github.com/paketo-buildpacks/ca-certificates/v3/cmd/main +GOOS="linux" go build -ldflags='-s -w' -o linux/amd64/bin/helper github.com/paketo-buildpacks/ca-certificates/v3/cmd/helper +GOOS="linux" GOARCH="arm64" go build -ldflags='-s -w' -o linux/arm64/bin/main github.com/paketo-buildpacks/ca-certificates/v3/cmd/main +GOOS="linux" GOARCH="arm64" go build -ldflags='-s -w' -o linux/arm64/bin/helper github.com/paketo-buildpacks/ca-certificates/v3/cmd/helper if [ "${STRIP:-false}" != "false" ]; then - strip bin/helper bin/main + strip linux/amd64/bin/main linux/arm64/bin/main linux/amd64/bin/helper linux/arm64/bin/helper fi if [ "${COMPRESS:-none}" != "none" ]; then - $COMPRESS bin/helper bin/main + $COMPRESS linux/amd64/bin/main linux/arm64/bin/main linux/amd64/bin/helper linux/arm64/bin/helper fi -ln -fs main bin/build -ln -fs main bin/detect +ln -fs main linux/amd64/bin/build +ln -fs main linux/arm64/bin/build +ln -fs main linux/amd64/bin/detect +ln -fs main linux/arm64/bin/detect