Skip to content

Commit

Permalink
Move "brews:"-related GoReleaser config generation into Golang codebase
Browse files Browse the repository at this point in the history
  • Loading branch information
edigaryev committed Apr 28, 2024
1 parent eb9f98b commit 3b48905
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 20 deletions.
26 changes: 26 additions & 0 deletions cmd/goreleaser/internal/configure.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,21 @@ func Generate(dist string) config.Project {
Signs: Sign(),
DockerSigns: DockerSigns(),
SBOMs: SBOM(),
Brews: []config.Homebrew{
{
Name: dist,
Description: Description(dist),
Homepage: "https://opentelemetry.io/docs/collector/",
License: "Apache-2.0",
IDs: []string{
dist,
},
Repository: config.RepoRef{
Owner: "open-telemetry",
Name: "homebrew-tap",
},
},
},
}
}

Expand Down Expand Up @@ -297,3 +312,14 @@ func SBOM() []config.SBOM {
},
}
}

func Description(dist string) string {
switch dist {
case "otelcol":
return "OpenTelemetry collector distribution containing only core components"
case "otelcol-contrib":
return "OpenTelemetry collector distribution containing both core and contrib components"
default:
return ""
}
}
20 changes: 10 additions & 10 deletions distributions/otelcol-contrib/.goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@ partial:
project_name: opentelemetry-collector-releases
env:
- COSIGN_YES=true
brews:
- name: otelcol-contrib
repository:
owner: open-telemetry
name: homebrew-tap
description: OpenTelemetry collector distribution containing both core and contrib components
homepage: https://opentelemetry.io/docs/collector/
license: Apache-2.0
ids:
- otelcol-contrib
builds:
- id: otelcol-contrib
goos:
Expand Down Expand Up @@ -249,13 +259,3 @@ sboms:
artifacts: archive
- id: package
artifacts: package
brews:
- name: otelcol-contrib
description: "OpenTelemetry collector distribution containing only core components"
homepage: "https://opentelemetry.io/docs/collector/"
license: "Apache-2.0"
ids:
- otelcol-contrib
repository:
owner: open-telemetry
name: homebrew-tap
20 changes: 10 additions & 10 deletions distributions/otelcol/.goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@ partial:
project_name: opentelemetry-collector-releases
env:
- COSIGN_YES=true
brews:
- name: otelcol
repository:
owner: open-telemetry
name: homebrew-tap
description: OpenTelemetry collector distribution containing only core components
homepage: https://opentelemetry.io/docs/collector/
license: Apache-2.0
ids:
- otelcol
builds:
- id: otelcol
goos:
Expand Down Expand Up @@ -249,13 +259,3 @@ sboms:
artifacts: archive
- id: package
artifacts: package
brews:
- name: otelcol
description: "OpenTelemetry collector distribution containing both core and contrib components"
homepage: "https://opentelemetry.io/docs/collector/"
license: "Apache-2.0"
ids:
- otelcol
repository:
owner: open-telemetry
name: homebrew-tap

0 comments on commit 3b48905

Please sign in to comment.