-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
Problem
GoReleaser is creating archive filenames with unwanted spaces after the hyphen:
mdv- tui_v1.0.0_linux_x86_64.tar.gz(should bemdv-tui_...)mdv- gui_v1.0.0_darwin_arm64.tar.gz(should bemdv-gui_...)
Root Cause
In .goreleaser.yaml, the name_template uses YAML's >- folding syntax incorrectly:
name_template: >-
{{ .ProjectName }}-
tui_
{{- .Version }}_The >- folds newlines into spaces, so this becomes:
{{ .ProjectName }}- tui_
↑ unwanted space here!
Solution
Put the suffix on the same line as the hyphen, like the mdv-mac-archive already does correctly:
File: .goreleaser.yaml
Fix mdv-tui-archive (lines 78-87)
- id: mdv-tui-archive
ids:
- mdv-cross
name_template: >-
{{ .ProjectName }}-tui_
{{- .Version }}_
{{- .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else }}{{ .Arch }}{{ end }}Fix mdv-gui-archive (lines 96-105)
- id: mdv-gui-archive
ids:
- mdv-darwin
name_template: >-
{{ .ProjectName }}-gui_
{{- .Version }}_
{{- .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else }}{{ .Arch }}{{ end }}Expected Result
After fix:
- ✅
mdv-tui_v1.0.0_linux_x86_64.tar.gz - ✅
mdv-gui_v1.0.0_darwin_arm64.tar.gz
References
- Lines 78-87: mdv-tui-archive name template
- Lines 96-105: mdv-gui-archive name template
- Lines 61-69: mdv-mac-archive (correct example)
Impact
- 🐛 Cosmetic issue only - doesn't affect functionality
- 📦 Affects all GoReleaser-created archives
- 🏷️ Makes asset names look unprofessional in GitHub Releases
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels