Skip to content

Commit

Permalink
Update goreleaser.yaml according to latest version
Browse files Browse the repository at this point in the history
With goreleaser version v1.14.0, archives.replacements and
nfpms.replacements have been deprecated and we can leverage their
respective name_template and file_name_template. Also the `replacements`
property has been removed in v1.19.0.

Updating goreleaser.yaml as per the suggested approach specified at
https://goreleaser.com/deprecations/#archivesreplacements

Signed-off-by: vinamra28 <jvinamra776@gmail.com>
  • Loading branch information
vinamra28 committed Sep 18, 2023
1 parent 7bcf993 commit 3312e38
Showing 1 changed file with 19 additions and 21 deletions.
40 changes: 19 additions & 21 deletions .goreleaser.yml
Expand Up @@ -17,14 +17,14 @@ builds:
ldflags:
- -w -X github.com/tektoncd/cli/pkg/cmd/version.clientVersion={{.Version}}
archives:
- name_template: "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
arm64: aarch64
- name_template: >-
{{- .Binary }}_
{{- .Version }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else if eq .Arch "arm64" }}aarch64
{{- else }}{{ .Arch }}{{ end }}
format_overrides:
- goos: windows
format: zip
Expand All @@ -41,10 +41,9 @@ changelog:
- Merge pull request
- Merge branch
release:
prerelease: true
prerelease: "true"
brews:
-
name: tektoncd-cli
- name: tektoncd-cli
tap:
owner: tektoncd
name: homebrew-tools
Expand All @@ -62,7 +61,15 @@ brews:
(zsh_completion/"_tkn").write output
prefix.install_metafiles
nfpms:
- file_name_template: "tektoncd-cli-{{.Version}}_{{.Os}}-{{.Arch}}"
- file_name_template: >-
tektoncd-cli-
{{- .Version }}_
{{- title .Os }}-
{{- if eq .Arch "amd64" }}64bit
{{- else if eq .Arch "386" }}32bit
{{- else if eq .Arch "arm" }}ARM
{{- else if eq .Arch "arm64" }}ARM64
{{- else }}{{ .Arch }}{{ end }}
homepage: https://github.com/tektoncd/cli/
description: A command line interface for interacting with Tekton
maintainer: Tekton Developers <tekton@tekton.dev>
Expand All @@ -72,15 +79,6 @@ nfpms:
- deb
- rpm
bindir: /usr/bin
replacements:
amd64: 64bit
386: 32bit
arm: ARM
arm64: ARM64
darwin: macOS
linux: Linux
windows: Windows

universal_binaries:
- replace: true
name_template: 'tkn'

0 comments on commit 3312e38

Please sign in to comment.