Skip to content

Fix S3 directory bug#57

Merged
nathanjcochran merged 2 commits intomainfrom
nathan/fix-S3-directory
Oct 14, 2025
Merged

Fix S3 directory bug#57
nathanjcochran merged 2 commits intomainfrom
nathan/fix-S3-directory

Conversation

@nathanjcochran
Copy link
Member

@nathanjcochran nathanjcochran commented Oct 14, 2025

Fixes a bug in #56.

GoReleaser is treating directory: "" in the S3 blob config the same as an omitted directory config, which is causing it to use its built-in default of {{ .ProjectName }}/{{ .Tag }} instead of the bucket root 🙄.

This fixes it by instead using a Go template that outputs an empty string ({{ "" }}), since the field supports templates, and this gets around the defaulting behavior while maintaining the same end result. There might be other ways to fix it too, but there's nothing about it in the docs, and this seems to work (I went ahead and released v0.9.2 from this branch to verify - probably should have just done that in the first place 😅 ).

@nathanjcochran nathanjcochran self-assigned this Oct 14, 2025
@nathanjcochran nathanjcochran force-pushed the nathan/fix-S3-directory branch from 36b92e2 to 43d1330 Compare October 14, 2025 20:43
@nathanjcochran nathanjcochran merged commit d0a1d5e into main Oct 14, 2025
2 checks passed
@nathanjcochran nathanjcochran deleted the nathan/fix-S3-directory branch October 14, 2025 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants