class Corectl < Formula desc "CoreOS over OS X made very simple" homepage "https://github.com/TheNewNormal/corectl" url "https://github.com/TheNewNormal/corectl/archive/v0.5.10.tar.gz" sha256 "e7b86914316d00f161c92f2b0bc0beb2ce26486199057e0536b16e6d47e2b47a" head "https://github.com/TheNewNormal/corectl.git", :branch => "golang" bottle do cellar :any_skip_relocation sha256 "bccdbdfd94b10e3b61c7b69c5420e5c5c580ac52502b6a09eec04955015c6aed" => :el_capitan sha256 "77bc96fd4dc2de9a6c1fb2bb736d04d698f82aa110e352c61474ed84748f89a4" => :yosemite end depends_on "go" => :build depends_on "godep" => :build depends_on :macos => :yosemite def install ENV["GOPATH"] = buildpath path = buildpath/"src/github.com/TheNewNormal/#{name}" path.install Dir["*"] args = [] args << "VERSION=#{version}" if build.stable? cd path do system "make", "corectl", *args system "make", "documentation/man" bin.install "corectl" man1.install Dir["documentation/man/*.1"] share.install "cloud-init", "profiles" end end test do assert_match(/#{version}/, shell_output("#{bin}/corectl version")) end end