From ae70d77a43758215750b58c6d2bf2c44d81101c2 Mon Sep 17 00:00:00 2001 From: GrantBirki Date: Fri, 8 Aug 2025 15:08:07 -0700 Subject: [PATCH 1/2] Refactor goreleaser configuration to use templated project name and module path --- .goreleaser.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 17061ac..e933c40 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -3,9 +3,9 @@ version: 2 builds: - - main: ./cmd/gh-combine # Default: `.`. + - main: ./cmd/{{ .ProjectName }} dir: "." - binary: gh-combine # Default: Project directory name. + binary: "{{ .ProjectName }}" env: - CGO_ENABLED=0 - GOPROXY=off @@ -21,7 +21,7 @@ builds: - windows - freebsd ldflags: - - -s -w -X github.com/github/gh-combine/internal/version.tag={{.Tag}} -X github.com/github/gh-combine/internal/version.commit={{.FullCommit}} -X github.com/github/gh-combine/internal/version.buildTime={{.CommitDate}} + - -s -w -X {{ .ModulePath }}/internal/version.tag={{.Tag}} -X {{ .ModulePath }}/internal/version.commit={{.FullCommit}} -X {{ .ModulePath }}/internal/version.buildTime={{.CommitDate}} archives: - formats: binary From 21e396afffff67cd2c387b9ecc85c061d658b968 Mon Sep 17 00:00:00 2001 From: GrantBirki Date: Fri, 8 Aug 2025 15:18:36 -0700 Subject: [PATCH 2/2] Update name_template in archives for consistent naming convention --- .goreleaser.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index e933c40..2508839 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -25,8 +25,7 @@ builds: archives: - formats: binary - name_template: "{{ .Os }}-{{ .Arch }}" - + name_template: "{{ .ProjectName }}_{{ .Os }}-{{ .Arch }}" # snapshots are used for testing and development purposes # build snapshots with `goreleaser build --snapshot --clean`