cat <<EOF
build:
  main: ./cmd/
  ldflags: "$1"
  goos:
    - linux
  goarch:
    - amd64
archive:
  name_template: "{{.Binary}}-{{.Version}}-{{.Os}}-{{.Arch}}"
  replacements:
    amd64: amd64
    darwin: darwin
    linux: linux
EOF
# This shellscript generates goreleaser.yaml with ldflags set to the first argument.
cat <<EOF
build:
  main: ./cmd/
  ldflags: "$1"
  goos:
    - linux
    - darwin
  goarch:
    - amd64
    - 386
archive:
  name_template: "{{.Binary}}-{{.Version}}-{{.Os}}-{{.Arch}}"
  replacements:
    amd64: amd64
    darwin: darwin
    linux: linux
EOF

Include darwin and 386 in goreleaser
chore: Include darwin and 386 in goreleaser
