forked from Homebrew/homebrew-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathocb.rb
26 lines (23 loc) · 884 Bytes
/
ocb.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
class Ocb < Formula
desc "Generate a custom OpenTelemetry Collector binary based on a given configuration"
homepage "https://opentelemetry.io/docs/collector/custom-collector/"
url "https://github.com/open-telemetry/opentelemetry-collector/archive/refs/tags/cmd/builder/v0.79.0.tar.gz"
sha256 "bf7f325eb10b57566654c573f6d33fa74ce368b67b001ba4b5aecbe811374aed"
license "Apache-2.0"
head "https://github.com/open-telemetry/opentelemetry-collector.git", branch: "main"
depends_on "go" => :build
def install
cd "cmd/builder" do
system "go", "build", *std_go_args(ldflags: "-s -w")
end
end
test do
(testpath/"manifest.yaml").write <<~EOS
dist:
name: otelcol-dev
description: Basic OTel Collector distribution for Developers
output_path: ./otelcol-dev
EOS
system bin/"ocb", "--config", "manifest.yaml"
end
end