From d8f0ee260c8f2647aefa4467a01991ccbf73568a Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Mon, 10 Jul 2023 10:42:26 +0200 Subject: [PATCH] Get rid of space at the end of archive name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For some reason the `make` produced these archives: ``` • archives • creating archive=dist/spr_linux_x86_64 .tar.gz • creating archive=dist/spr_linux_arm64 .tar.gz • creating archive=dist/spr_windows_x86_64 .zip • creating archive=dist/spr_windows_arm64 .zip • creating archive=dist/spr_darwin_arm64 .tar.gz • creating archive=dist/spr_linux_i386 .tar.gz • creating archive=dist/spr_windows_i386 .zip • creating archive=dist/spr_darwin_x86_64 .tar.gz ``` Notice the space at the end. I guess it has to do with folding newlines into whitespaces but for the sake of a quick fix I just reformatted the `>-` YAML multi-line string as a regular string in one line and now the problem is gone. This addresses https://github.com/ejoffe/spr/pull/344#issuecomment-1627388084 Fixup for #340 --- .goreleaser.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index c287c44..c060d2c 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -32,14 +32,7 @@ builds: ldflags: - -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.CommitDate}} -X main.builtBy=gorelease archives: - - name_template: >- - {{ .ProjectName }}_ - {{- if eq .Os "Darwin" }}macos_ - {{- else }}{{- tolower .Os }}_{{end}} - {{- if eq .Arch "amd64" }}x86_64 - {{- else if eq .Arch "386" }}i386 - {{- else }}{{ .Arch }}{{ end }} - {{ if .Arm }}v{{ .Arm }}{{ end }} + - name_template: '{{ .ProjectName }}_{{- if eq .Os "Darwin" }}macos_{{- else }}{{- tolower .Os }}_{{end}}{{- if eq .Arch "amd64" }}x86_64{{- else if eq .Arch "386" }}i386{{- else }}{{ .Arch }}{{ end }}{{ if .Arm }}v{{ .Arm }}{{ end }}' format_overrides: - goos: windows format: zip