Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] move partial goreleaser config to native code #758

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions cmd/goreleaser/internal/configure.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ var (
K8sDockerSkipArchs = map[string]bool{"arm": true, "386": true}
K8sGoos = []string{"linux"}
K8sArchs = []string{"amd64", "arm64", "ppc64le", "s390x"}
Partial = config.Partial{By: "target"}
)

func GenerateContribBuildOnly(dist string, buildOrRest bool) config.Project {
Expand All @@ -57,6 +58,7 @@ func GenerateContribBuildOnly(dist string, buildOrRest bool) config.Project {
Monorepo: config.Monorepo{
TagPrefix: "v",
},
Partial: Partial,
}
}

Expand All @@ -80,6 +82,7 @@ func Generate(dist string, buildOrRest bool) config.Project {
Monorepo: config.Monorepo{
TagPrefix: "v",
},
Partial: Partial,
}
}

Expand Down
11 changes: 0 additions & 11 deletions cmd/goreleaser/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,8 @@ func main() {
project = internal.Generate(*distFlag, *contribBuildOrRestFlag)
}

partial := map[string]any{
"partial": map[string]any{
"by": "target",
},
}
e := yaml.NewEncoder(os.Stdout)
e.SetIndent(2)
if err := e.Encode(partial); err != nil {
log.Fatal(err)
}

e = yaml.NewEncoder(os.Stdout)
e.SetIndent(2)
if err := e.Encode(&project); err != nil {
log.Fatal(err)
}
Expand Down
4 changes: 2 additions & 2 deletions distributions/otelcol-contrib/.goreleaser-build.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
partial:
by: target
version: 2
project_name: opentelemetry-collector-releases
builds:
Expand Down Expand Up @@ -41,3 +39,5 @@ builds:
- CGO_ENABLED=0
monorepo:
tag_prefix: v
partial:
by: target
4 changes: 2 additions & 2 deletions distributions/otelcol-contrib/.goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
partial:
by: target
version: 2
project_name: opentelemetry-collector-releases
env:
Expand Down Expand Up @@ -258,3 +256,5 @@ sboms:
artifacts: package
monorepo:
tag_prefix: v
partial:
by: target
4 changes: 2 additions & 2 deletions distributions/otelcol-k8s/.goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
partial:
by: target
version: 2
project_name: opentelemetry-collector-releases
env:
Expand Down Expand Up @@ -151,3 +149,5 @@ sboms:
artifacts: package
monorepo:
tag_prefix: v
partial:
by: target
4 changes: 2 additions & 2 deletions distributions/otelcol-otlp/.goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
partial:
by: target
version: 2
project_name: opentelemetry-collector-releases
env:
Expand Down Expand Up @@ -246,3 +244,5 @@ sboms:
artifacts: package
monorepo:
tag_prefix: v
partial:
by: target
4 changes: 2 additions & 2 deletions distributions/otelcol/.goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
partial:
by: target
version: 2
project_name: opentelemetry-collector-releases
env:
Expand Down Expand Up @@ -262,3 +260,5 @@ sboms:
artifacts: package
monorepo:
tag_prefix: v
partial:
by: target
Loading