Skip to content

Commit

Permalink
Merge pull request #1585 from paketo-buildpacks/build-fix
Browse files Browse the repository at this point in the history
Force arch for amd64
  • Loading branch information
anthonydahanne authored Apr 26, 2024
2 parents 506b816 + b1f348f commit fb5de9c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions octo/build-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ set -euo pipefail
GOMOD=$(head -1 go.mod | awk '{print $2}')

{{- range $key, $value := .}}
GOOS="linux" go build -ldflags='-s -w' -o "linux/amd64/{{ $key }}" "{{ $value }}"
GOOS="linux" GOARCH="amd64" go build -ldflags='-s -w' -o "linux/amd64/{{ $key }}" "{{ $value }}"
GOOS="linux" GOARCH="arm64" go build -ldflags='-s -w' -o "linux/arm64/{{ $key }}" "{{ $value }}"
{{- end }}
GOOS="linux" go build -ldflags='-s -w' -o linux/amd64/bin/main "$GOMOD/cmd/main"
GOOS="linux" GOARCH="amd64" 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
Expand Down
Loading

0 comments on commit fb5de9c

Please sign in to comment.