fix: goreleaser deprecated replacements, fixing the filename templates

This commit is contained in:
Gary Holtz 2023-06-29 20:59:09 -05:00
parent 1f8464b403
commit d0dcebea45
No known key found for this signature in database
GPG Key ID: 0C3B92677CFEE92F
1 changed files with 19 additions and 16 deletions

View File

@ -85,37 +85,40 @@ archives:
- id: nix - id: nix
builds: [macos, linux] builds: [macos, linux]
<<: &archive_defaults <<: &archive_defaults
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}" name_template: >-
{{ .ProjectName }}_
{{- .Version }}_
{{- if eq .Os "darwin" }}macOS
{{- else if eq .Os "linux" }}Linux
{{- else if eq .Os "windows" }}Windows{{ end }}_
{{- if eq .Arch "386" }}i386
{{- else if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "arm" }}arm
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
wrap_in_directory: false wrap_in_directory: false
format: tar.gz format: tar.gz
replacements:
darwin: macOS
linux: Linux
<<: &arch_replacemens
386: i386
amd64: x86_64
- id: windows - id: windows
builds: [windows] builds: [windows]
<<: *archive_defaults <<: *archive_defaults
format: zip format: zip
replacements:
windows: Windows
<<: *arch_replacemens
nfpms: nfpms:
- id: foo - id: foo
package_name: glab package_name: glab
file_name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" file_name_template: >-
{{ .ProjectName }}_
{{- .Version }}_
{{- if eq .Os "darwin" }}macOS
{{- else if eq .Os "linux" }}Linux{{ end }}_
{{- if eq .Arch "386" }}i386
{{- else if eq .Arch "amd64" }}x86_64
{{- else }}{{ .Arch }}{{ end }}
# Build IDs for the builds you want to create NFPM packages for. # Build IDs for the builds you want to create NFPM packages for.
# Defaults to all builds. # Defaults to all builds.
replacements:
amd64: x86_64
386: i386
darwin: macOS
linux: Linux
vendor: GitLab vendor: GitLab
homepage: https://gitlab.com/gitlab-org/cli homepage: https://gitlab.com/gitlab-org/cli
# using service-desk email https://docs.gitlab.com/ee/user/project/service_desk.html # using service-desk email https://docs.gitlab.com/ee/user/project/service_desk.html