neilotoole / sq

sq data wrangler
https://sq.io
MIT License
2.09k stars 33 forks source link

chore: fix asset names #442

Open suzuki-shunsuke opened 3 weeks ago

suzuki-shunsuke commented 3 weeks ago

This pull request fixes asset names in GitHub Releases. Now {{.Arch}} is duplicated.

https://github.com/neilotoole/sq/releases/tag/v0.48.3

image
sq-0.48.3-amd64-amd64.tar.gz
sq-0.48.3-amd64-amd64.zip
sq-0.48.3-arm64-arm64.tar.gz
suzuki-shunsuke commented 3 weeks ago

This issue was caused by https://github.com/neilotoole/sq/commit/b76149925ed775b12aa3b3abde406b6169af3479 . https://github.com/neilotoole/sq/releases/tag/v0.41.0

neilotoole commented 1 week ago

@suzuki-shunsuke Thanks for the PR. I haven't had time to drill down on this in detail. Can you please elaborate on the problem that this PR is aiming to fix?

suzuki-shunsuke commented 1 week ago

I think these asset names are wrong because the word amd64 or arm64 is duplicated and they don't include os.

https://github.com/neilotoole/sq/releases/tag/v0.48.3

Please see .goreleaser.yml's name_template.

    name_template: >-
      {{.ProjectName}}-{{ .Version }}-{{- if eq .Os "darwin" }}macos{{- else }}{{ .Arch }}{{ end }}-{{.Arch}}

If OS isn't darwin,

    name_template: >-
      {{.ProjectName}}-{{ .Version }}-{{ .Arch }}-{{.Arch}}

{{.Arch}} is duplicated. This pull request replaces the first {{.Arch}} with {{.Os}}.

    name_template: >-
      {{.ProjectName}}-{{ .Version }}-{{ .Os }}-{{.Arch}}

Then you can see which OS these assets are for.