Skip to content

Commit 2747f2e

Browse files
authored
[chore] move partial goreleaser config to native code (#758)
Signed-off-by: Moritz Wiesinger <[email protected]>
1 parent fed57db commit 2747f2e

File tree

7 files changed

+13
-21
lines changed

7 files changed

+13
-21
lines changed

cmd/goreleaser/internal/configure.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ var (
4747
K8sDockerSkipArchs = map[string]bool{"arm": true, "386": true}
4848
K8sGoos = []string{"linux"}
4949
K8sArchs = []string{"amd64", "arm64", "ppc64le", "s390x"}
50+
Partial = config.Partial{By: "target"}
5051
)
5152

5253
func GenerateContribBuildOnly(dist string, buildOrRest bool) config.Project {
@@ -57,6 +58,7 @@ func GenerateContribBuildOnly(dist string, buildOrRest bool) config.Project {
5758
Monorepo: config.Monorepo{
5859
TagPrefix: "v",
5960
},
61+
Partial: Partial,
6062
}
6163
}
6264

@@ -80,6 +82,7 @@ func Generate(dist string, buildOrRest bool) config.Project {
8082
Monorepo: config.Monorepo{
8183
TagPrefix: "v",
8284
},
85+
Partial: Partial,
8386
}
8487
}
8588

cmd/goreleaser/main.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,19 +43,8 @@ func main() {
4343
project = internal.Generate(*distFlag, *contribBuildOrRestFlag)
4444
}
4545

46-
partial := map[string]any{
47-
"partial": map[string]any{
48-
"by": "target",
49-
},
50-
}
5146
e := yaml.NewEncoder(os.Stdout)
5247
e.SetIndent(2)
53-
if err := e.Encode(partial); err != nil {
54-
log.Fatal(err)
55-
}
56-
57-
e = yaml.NewEncoder(os.Stdout)
58-
e.SetIndent(2)
5948
if err := e.Encode(&project); err != nil {
6049
log.Fatal(err)
6150
}

distributions/otelcol-contrib/.goreleaser-build.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
partial:
2-
by: target
31
version: 2
42
project_name: opentelemetry-collector-releases
53
builds:
@@ -41,3 +39,5 @@ builds:
4139
- CGO_ENABLED=0
4240
monorepo:
4341
tag_prefix: v
42+
partial:
43+
by: target

distributions/otelcol-contrib/.goreleaser.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
partial:
2-
by: target
31
version: 2
42
project_name: opentelemetry-collector-releases
53
env:
@@ -258,3 +256,5 @@ sboms:
258256
artifacts: package
259257
monorepo:
260258
tag_prefix: v
259+
partial:
260+
by: target

distributions/otelcol-k8s/.goreleaser.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
partial:
2-
by: target
31
version: 2
42
project_name: opentelemetry-collector-releases
53
env:
@@ -151,3 +149,5 @@ sboms:
151149
artifacts: package
152150
monorepo:
153151
tag_prefix: v
152+
partial:
153+
by: target

distributions/otelcol-otlp/.goreleaser.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
partial:
2-
by: target
31
version: 2
42
project_name: opentelemetry-collector-releases
53
env:
@@ -246,3 +244,5 @@ sboms:
246244
artifacts: package
247245
monorepo:
248246
tag_prefix: v
247+
partial:
248+
by: target

distributions/otelcol/.goreleaser.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
partial:
2-
by: target
31
version: 2
42
project_name: opentelemetry-collector-releases
53
env:
@@ -262,3 +260,5 @@ sboms:
262260
artifacts: package
263261
monorepo:
264262
tag_prefix: v
263+
partial:
264+
by: target

0 commit comments

Comments
 (0)