Skip to content

Commit 4f0f4c3

Browse files
committed
fix checksum files being overwritten by windows release
1 parent bc8181c commit 4f0f4c3

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

cmd/goreleaser/internal/configure.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ func (b *distributionBuilder) sboms() []config.SBOM {
354354
func (b *distributionBuilder) WithDefaultChecksum() *distributionBuilder {
355355
b.configFuncs = append(b.configFuncs, func(d *distribution) {
356356
b.dist.checksum = config.Checksum{
357-
NameTemplate: fmt.Sprintf("{{ .ProjectName }}_%v_checksums.txt", d.name),
357+
NameTemplate: fmt.Sprintf("{{ .ProjectName }}_%v{{ if .Runtime.Goos == \"windows\" }}_{{ .Runtime.Goos }}{{ end }}_checksums.txt", d.name),
358358
}
359359
})
360360
return b

distributions/otelcol-contrib/.goreleaser.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ nfpms:
102102
builds:
103103
- otelcol-contrib-linux
104104
checksum:
105-
name_template: '{{ .ProjectName }}_otelcol-contrib_checksums.txt'
105+
name_template: '{{ .ProjectName }}_otelcol-contrib{{ if .Runtime.Goos == "windows" }}_{{ .Runtime.Goos }}{{ end }}_checksums.txt'
106106
dockers:
107107
- goos: linux
108108
goarch: "386"

distributions/otelcol-ebpf-profiler/.goreleaser.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ archives:
2626
builds:
2727
- otelcol-ebpf-profiler-linux
2828
checksum:
29-
name_template: '{{ .ProjectName }}_otelcol-ebpf-profiler_checksums.txt'
29+
name_template: '{{ .ProjectName }}_otelcol-ebpf-profiler{{ if .Runtime.Goos == "windows" }}_{{ .Runtime.Goos }}{{ end }}_checksums.txt'
3030
dockers:
3131
- goos: linux
3232
goarch: amd64

distributions/otelcol-k8s/.goreleaser.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ archives:
4343
- otelcol-k8s-linux
4444
- otelcol-k8s-windows
4545
checksum:
46-
name_template: '{{ .ProjectName }}_otelcol-k8s_checksums.txt'
46+
name_template: '{{ .ProjectName }}_otelcol-k8s{{ if .Runtime.Goos == "windows" }}_{{ .Runtime.Goos }}{{ end }}_checksums.txt'
4747
dockers:
4848
- goos: linux
4949
goarch: amd64

distributions/otelcol-otlp/.goreleaser.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ nfpms:
9393
builds:
9494
- otelcol-otlp-linux
9595
checksum:
96-
name_template: '{{ .ProjectName }}_otelcol-otlp_checksums.txt'
96+
name_template: '{{ .ProjectName }}_otelcol-otlp{{ if .Runtime.Goos == "windows" }}_{{ .Runtime.Goos }}{{ end }}_checksums.txt'
9797
dockers:
9898
- goos: linux
9999
goarch: "386"

distributions/otelcol/.goreleaser.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ nfpms:
9797
builds:
9898
- otelcol-linux
9999
checksum:
100-
name_template: '{{ .ProjectName }}_otelcol_checksums.txt'
100+
name_template: '{{ .ProjectName }}_otelcol{{ if .Runtime.Goos == "windows" }}_{{ .Runtime.Goos }}{{ end }}_checksums.txt'
101101
dockers:
102102
- goos: linux
103103
goarch: "386"

0 commit comments

Comments
 (0)