feat: introduce release version env variable for goreleaser

This commit is contained in:
mrekucci 2024-06-13 19:13:54 +02:00
parent 06340fcfff
commit 6e15b3b6a3

View file

@ -26,9 +26,13 @@ archives:
- format: tar.gz
name_template: >-
{{- .Binary }}_
{{- if .IsSnapshot }}{{ .ShortCommit }}
{{- else }}{{ .Version }}
{{ end }}
{{- with index .Env "RELEASE_VERSION" -}}
{{ . }}
{{- else -}}
{{- if .IsSnapshot }}{{ .ShortCommit }}
{{- else }}{{ .Version }}
{{- end }}
{{- end -}}
{{- with index .Env "DIRTY_SUFFIX" -}}
{{ . }}
{{- end -}}_
@ -52,9 +56,13 @@ archives:
checksum:
name_template: >-
{{ .ProjectName }}_
{{- if .IsSnapshot }}{{ .ShortCommit }}
{{- else }}{{ .Version }}
{{- end }}
{{- with index .Env "RELEASE_VERSION" -}}
{{ . }}
{{- else -}}
{{- if .IsSnapshot }}{{ .ShortCommit }}
{{- else }}{{ .Version }}
{{- end }}
{{- end -}}
{{- with index .Env "DIRTY_SUFFIX" -}}
{{ . }}
{{- end -}}