Skip to content

Replace promu with GoReleaser to fix missing version info in Docker images#170

Merged
damoun merged 4 commits intomainfrom
claude/fix-issue-167-A9Tcv
Mar 22, 2026
Merged

Replace promu with GoReleaser to fix missing version info in Docker images#170
damoun merged 4 commits intomainfrom
claude/fix-issue-167-A9Tcv

Conversation

@damoun
Copy link
Copy Markdown
Owner

@damoun damoun commented Mar 22, 2026

Summary

  • Switch from promu to GoReleaser as the build system, fixing --version showing empty fields in Docker images (--version output missing version string in v1.1.0 release #167)
  • Add .goreleaser.yml with ldflags for version injection, multi-arch Docker builds (amd64, arm64, armv7), and Docker manifests
  • Simplify Dockerfile from multi-stage build to single stage (GoReleaser provides the pre-built binary)
  • Rewrite CI workflows: build.yml uses goreleaser build --snapshot for PR validation, publish.yml uses goreleaser release on tag push
  • Replace Makefile + Makefile.common (283-line Prometheus boilerplate) with a simple 35-line Makefile
  • Remove .promu.yml and Makefile.common

Test plan

  • Verify goreleaser build --snapshot --clean succeeds locally
  • Verify ./dist/twitch_exporter_linux_amd64_v1/twitch_exporter --version shows populated version fields
  • Verify make build, make test, make lint work with the new Makefile
  • Verify CI build workflow passes on PR
  • Tag a test release and confirm multi-arch Docker images are pushed to <ghcr.io/damoun/twitch-exporter>

claude added 2 commits March 22, 2026 12:56
Switch from promu to GoReleaser to fix missing version info in Docker
images (#167). The Dockerfile previously used plain `go build` without
ldflags, so `--version` showed empty fields.

Changes:
- Add .goreleaser.yml with ldflags for version injection, multi-arch
  Docker image builds, and Docker manifests
- Simplify Dockerfile to single stage (GoReleaser provides the binary)
- Rewrite publish.yml to use goreleaser-action on tag push
- Rewrite build.yml to validate builds with goreleaser --snapshot on PRs
- Replace Makefile + Makefile.common with a simple Makefile
- Remove .promu.yml and Makefile.common (no longer needed)

https://claude.ai/code/session_012aF4Jp3RFW7zw5wYL1Wedv
Update to real release SHAs:
- actions/setup-go v5.6.0 (40f1582b2485089dde7abd97c1529aa768e1baff)
- goreleaser/goreleaser-action v6.4.0 (e435ccd777264be153ace6237001ef4d979d3a7a)

https://claude.ai/code/session_012aF4Jp3RFW7zw5wYL1Wedv
claude added 2 commits March 22, 2026 13:49
Zizmor flags actions/setup-go's built-in cache as vulnerable to cache
poisoning attacks. Disable it explicitly since GoReleaser manages its
own build process.

https://claude.ai/code/session_012aF4Jp3RFW7zw5wYL1Wedv
Chore commits often contain dependency bumps which are useful to
surface in release changelogs for security-conscious users.

https://claude.ai/code/session_012aF4Jp3RFW7zw5wYL1Wedv
@damoun damoun merged commit 97b4319 into main Mar 22, 2026
7 checks passed
@damoun damoun deleted the claude/fix-issue-167-A9Tcv branch March 22, 2026 14:01
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.

3 participants