Skip to content

Commit 81e2bb0

Browse files
committed
try to use target env var more
Signed-off-by: Moritz Wiesinger <[email protected]>
1 parent 645ff96 commit 81e2bb0

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

cmd/goreleaser/internal/configure.go

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,7 @@ func Build(dist string, buildOrRest bool) config.Build {
101101
ID: dist,
102102
Builder: "prebuilt",
103103
PreBuilt: config.PreBuiltOptions{
104-
Path: "artifacts/otelcol-contrib_{{ .Os }}_{{ .Arch }}" +
105-
"{{ with .Amd64 }}_{{ . }}{{ end }}" +
106-
"{{ with .Arm }}_{{ . }}{{ end }}" +
107-
"{{ with .Mips }}_{{ . }}{{ end }}" +
108-
"{{ with .I386 }}_{{ . }}{{ end }}" +
109-
"{{ with .Arm64 }}_{{ . }}{{ end }}" +
104+
Path: "artifacts/otelcol-contrib_{{ .Target }}" +
110105
"/otelcol-contrib{{- if eq .Os \"windows\" }}.exe{{ end }}",
111106
},
112107
Goos: goos,
@@ -171,7 +166,7 @@ func Archives(dist string) []config.Archive {
171166
func Archive(dist string) config.Archive {
172167
return config.Archive{
173168
ID: dist,
174-
NameTemplate: "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}",
169+
NameTemplate: "{{ .Binary }}_{{ .Version }}_{{ .Target }}",
175170
Builds: []string{dist},
176171
}
177172
}

distributions/otelcol-contrib/.goreleaser.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ archives:
4848
- id: otelcol-contrib
4949
builds:
5050
- otelcol-contrib
51-
name_template: '{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}'
51+
name_template: '{{ .Binary }}_{{ .Version }}_{{ .Target }}'
5252
nfpms:
5353
- package_name: otelcol-contrib
5454
contents:

0 commit comments

Comments
 (0)