Skip to content

Commit 06d2194

Browse files
authored
fix: Correctly check for windows OS in goreleaser config (#1093)
1 parent 2d5727b commit 06d2194

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{{ if .Runtime.Goos == \"windows\" }}_{{ .Runtime.Goos }}{{ end }}_checksums.txt", d.name),
357+
NameTemplate: fmt.Sprintf("{{ .ProjectName }}_%v{{ if eq .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
@@ -103,7 +103,7 @@ nfpms:
103103
builds:
104104
- otelcol-contrib-linux
105105
checksum:
106-
name_template: '{{ .ProjectName }}_otelcol-contrib{{ if .Runtime.Goos == "windows" }}_{{ .Runtime.Goos }}{{ end }}_checksums.txt'
106+
name_template: '{{ .ProjectName }}_otelcol-contrib{{ if eq .Runtime.Goos "windows" }}_{{ .Runtime.Goos }}{{ end }}_checksums.txt'
107107
dockers:
108108
- goos: linux
109109
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{{ if .Runtime.Goos == "windows" }}_{{ .Runtime.Goos }}{{ end }}_checksums.txt'
29+
name_template: '{{ .ProjectName }}_otelcol-ebpf-profiler{{ if eq .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
@@ -44,7 +44,7 @@ archives:
4444
- otelcol-k8s-linux
4545
- otelcol-k8s-windows
4646
checksum:
47-
name_template: '{{ .ProjectName }}_otelcol-k8s{{ if .Runtime.Goos == "windows" }}_{{ .Runtime.Goos }}{{ end }}_checksums.txt'
47+
name_template: '{{ .ProjectName }}_otelcol-k8s{{ if eq .Runtime.Goos "windows" }}_{{ .Runtime.Goos }}{{ end }}_checksums.txt'
4848
dockers:
4949
- goos: linux
5050
goarch: amd64

distributions/otelcol-otlp/.goreleaser.yaml

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

distributions/otelcol/.goreleaser.yaml

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

0 commit comments

Comments
 (0)