collector-sidecar 0.0.9 (new formula)

Closes #9910.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
jabenninghoff 2017-02-12 21:18:41 -06:00 committed by Mike McQuaid
parent 3994d4bd6f
commit 6739b3ce5c

View file

@ -0,0 +1,31 @@
class CollectorSidecar < Formula
desc "Manage log collectors through Graylog"
homepage "https://github.com/Graylog2/collector-sidecar"
url "https://github.com/Graylog2/collector-sidecar/archive/0.0.9.tar.gz"
sha256 "a854d84bf65e3fb9409743869701dab5c059d14d0b615acd14c8923bef30bc9f"
depends_on "glide" => :build
depends_on "go" => :build
depends_on :hg => :build
depends_on "filebeat" => :run
def install
ENV["GOPATH"] = buildpath
ENV["GLIDE_HOME"] = HOMEBREW_CACHE/"glide_home/#{name}"
(buildpath/"src/github.com/Graylog2/collector-sidecar").install buildpath.children
cd "src/github.com/Graylog2/collector-sidecar" do
inreplace "main.go", "/etc", etc
inreplace "collector_sidecar.yml", "/usr", HOMEBREW_PREFIX
inreplace "collector_sidecar.yml", "/etc", etc
inreplace "collector_sidecar.yml", "/var", var
system "glide", "install"
system "make", "build"
(etc/"graylog/collector-sidecar").install "collector_sidecar.yml"
bin.install "graylog-collector-sidecar"
end
end
test do
assert_match version.to_s, shell_output("#{bin}/graylog-collector-sidecar -version")
end
end