ejoffe / spr

Stacked Pull Requests on GitHub
MIT License
796 stars 68 forks source link

Address `archives.replacements` being removed from goreleaser #340

Closed kwk closed 1 year ago

kwk commented 1 year ago

The archives.replacement structure in the .goreleaser.yml was deprecated and recently removed.

This change addresses this problem by using the proposed solution from https://goreleaser.com/deprecations/#archivesreplacements with a slight modification. Instead of title-cased replacements of the operating system we want it to be all lowercase because that is how the old replacement items looked like:

archives:
  - name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
    replacements:
      darwin: macos
      linux: linux
      windows: windows
      386: i386
      amd64: x86_64      

Hence the new name_template uses as lower-cased operating system name ({{- tolower .Os }}) and a special handling for turning darwin into macos as well as the architecture handling.

Then another deprecation warning came up:

DEPRECATED: `brews.tap` should not be used anymore, check https://goreleaser.com/deprecations#brewstap for more info

I addressed this with a simply tap -> repository replacement.

Fixes #339