homebrew-core/Formula/gofabric8.rb

29 lines
840 B
Ruby
Raw Normal View History

class Gofabric8 < Formula
desc "CLI for fabric8 running on Kubernetes or OpenShift"
homepage "https://github.com/fabric8io/gofabric8/"
url "https://github.com/fabric8io/gofabric8/archive/v0.4.72.tar.gz"
sha256 "0c082072fc9731fc939b6d4b6719adf20e0e69ff780d613337e1832ab9e8a1db"
depends_on "go" => :build
def install
ENV["GOPATH"] = buildpath
dir = buildpath/"src/github.com/fabric8io/gofabric8"
dir.install buildpath.children
cd dir do
system "make", "install", "REV=homebrew"
end
bin.install "bin/gofabric8"
end
test do
Open3.popen3("#{bin}/gofabric8", "version") do |stdin, stdout, _|
stdin.puts "N" # Reject any auto-update prompts
stdin.close
assert_match(/gofabric8, version #{version} \(branch: 'unknown', revision: 'homebrew'\)/, stdout.read)
end
end
end