-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: Fix goreleaser deprecation #5270
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the prompt fix! Here's the output of TAG=v2.6.2 goreleaser release --snapshot --skip-announce --skip-docker --skip-publish --skip-sbom --skip-sign --rm-dist
:
dist/caddy_2.6.2-SNAPSHOT-b1814345_linux_amd64.deb
dist/caddy_2.6.2-SNAPSHOT-b1814345_linux_amd64.tar.gz
dist/caddy_2.6.2-SNAPSHOT-b1814345_linux_arm64.deb
dist/caddy_2.6.2-SNAPSHOT-b1814345_linux_arm64.tar.gz
dist/caddy_2.6.2-SNAPSHOT-b1814345_linux_armv5.deb
dist/caddy_2.6.2-SNAPSHOT-b1814345_linux_armv5.tar.gz
dist/caddy_2.6.2-SNAPSHOT-b1814345_linux_armv6.deb
dist/caddy_2.6.2-SNAPSHOT-b1814345_linux_armv6.tar.gz
dist/caddy_2.6.2-SNAPSHOT-b1814345_linux_armv7.deb
dist/caddy_2.6.2-SNAPSHOT-b1814345_linux_armv7.tar.gz
dist/caddy_2.6.2-SNAPSHOT-b1814345_linux_ppc64le.deb
dist/caddy_2.6.2-SNAPSHOT-b1814345_linux_ppc64le.tar.gz
dist/caddy_2.6.2-SNAPSHOT-b1814345_mac_amd64.tar.gz
dist/caddy_2.6.2-SNAPSHOT-b1814345_mac_arm64.tar.gz
That output was possible after fixing the {{ -
thing 🙂
List of archives using the command @mohammed90 shared:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just noticed that the .sbom
s for darwin/mac use _darwin_
instead of _mac_
1.
Line 78 in b166b90
- '{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{if .Arm}}v{{ .Arm }}{{end}}.sbom' |
I couldn't find a way to use a variable instead of copy pasting the templating, but
documents:
- >-
{{ .ProjectName }}_
{{- .Version }}_
{{- if eq .Os "darwin" }}mac{{ else }}{{ .Os }}{{ end }}_
{{- .Arch }}
{{- with .Arm }}v{{ . }}{{ end }}
{{- with .Mips }}_{{ . }}{{ end }}
{{- if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}.sbom
cmd: syft
works and makes the .sbom
s follow the archives' names.
Footnotes
Good catch! |
Thanks guys. Final 👍 before I merge? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good 👍
Outputs:
caddy_2.6.2-SNAPSHOT-91554ed7_freebsd_amd64.sbom
caddy_2.6.2-SNAPSHOT-91554ed7_freebsd_amd64.tar.gz
caddy_2.6.2-SNAPSHOT-91554ed7_freebsd_arm64.sbom
caddy_2.6.2-SNAPSHOT-91554ed7_freebsd_arm64.tar.gz
caddy_2.6.2-SNAPSHOT-91554ed7_freebsd_armv6.sbom
caddy_2.6.2-SNAPSHOT-91554ed7_freebsd_armv6.tar.gz
caddy_2.6.2-SNAPSHOT-91554ed7_freebsd_armv7.sbom
caddy_2.6.2-SNAPSHOT-91554ed7_freebsd_armv7.tar.gz
caddy_2.6.2-SNAPSHOT-91554ed7_linux_amd64.deb
caddy_2.6.2-SNAPSHOT-91554ed7_linux_amd64.sbom
caddy_2.6.2-SNAPSHOT-91554ed7_linux_amd64.tar.gz
caddy_2.6.2-SNAPSHOT-91554ed7_linux_arm64.deb
caddy_2.6.2-SNAPSHOT-91554ed7_linux_arm64.sbom
caddy_2.6.2-SNAPSHOT-91554ed7_linux_arm64.tar.gz
caddy_2.6.2-SNAPSHOT-91554ed7_linux_armv5.deb
caddy_2.6.2-SNAPSHOT-91554ed7_linux_armv5.sbom
caddy_2.6.2-SNAPSHOT-91554ed7_linux_armv5.tar.gz
caddy_2.6.2-SNAPSHOT-91554ed7_linux_armv6.deb
caddy_2.6.2-SNAPSHOT-91554ed7_linux_armv6.sbom
caddy_2.6.2-SNAPSHOT-91554ed7_linux_armv6.tar.gz
caddy_2.6.2-SNAPSHOT-91554ed7_linux_armv7.deb
caddy_2.6.2-SNAPSHOT-91554ed7_linux_armv7.sbom
caddy_2.6.2-SNAPSHOT-91554ed7_linux_armv7.tar.gz
caddy_2.6.2-SNAPSHOT-91554ed7_linux_ppc64le.deb
caddy_2.6.2-SNAPSHOT-91554ed7_linux_ppc64le.sbom
caddy_2.6.2-SNAPSHOT-91554ed7_linux_ppc64le.tar.gz
caddy_2.6.2-SNAPSHOT-91554ed7_linux_s390x.deb
caddy_2.6.2-SNAPSHOT-91554ed7_linux_s390x.sbom
caddy_2.6.2-SNAPSHOT-91554ed7_linux_s390x.tar.gz
caddy_2.6.2-SNAPSHOT-91554ed7_mac_amd64.sbom
caddy_2.6.2-SNAPSHOT-91554ed7_mac_amd64.tar.gz
caddy_2.6.2-SNAPSHOT-91554ed7_mac_arm64.sbom
caddy_2.6.2-SNAPSHOT-91554ed7_mac_arm64.tar.gz
caddy_2.6.2-SNAPSHOT-91554ed7_windows_amd64.sbom
caddy_2.6.2-SNAPSHOT-91554ed7_windows_amd64.zip
caddy_2.6.2-SNAPSHOT-91554ed7_windows_arm64.sbom
caddy_2.6.2-SNAPSHOT-91554ed7_windows_arm64.zip
caddy_2.6.2-SNAPSHOT-91554ed7_windows_armv5.sbom
caddy_2.6.2-SNAPSHOT-91554ed7_windows_armv5.zip
caddy_2.6.2-SNAPSHOT-91554ed7_windows_armv6.sbom
caddy_2.6.2-SNAPSHOT-91554ed7_windows_armv6.zip
caddy_2.6.2-SNAPSHOT-91554ed7_windows_armv7.sbom
caddy_2.6.2-SNAPSHOT-91554ed7_windows_armv7.zip
91554ed
to
aec1ba8
Compare
You guys are incredible. Thanks for this and everything else you do! |
See caddyserver/caddy#5270 where we made this change for Caddy
See https://goreleaser.com/deprecations/#archivesreplacements
I took the default for
name_template
documented at https://goreleaser.com/customization/archive/?h=archive#archives, turned it into a multi-line string using the "After" tab from https://goreleaser.com/deprecations/#archivesreplacements, then changed{{ .Os }}
to be wrapped by anif darwin
outputtingmac
instead.Technically untested, the goreleaser_check seems to pass now but I didn't run it to see if the template has the expected result. I don't have it installed locally etc so would appreciate if you could test it out @mohammed90 😊