Skip to content

Commit

Permalink
Get rid of space at the end of archive name
Browse files Browse the repository at this point in the history
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 #344 (comment)

Fixup for #340
  • Loading branch information
kwk authored and ejoffe committed Jul 10, 2023
1 parent f00e0f6 commit d8f0ee2
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d8f0ee2

Please sign in to comment.