class DockerMachine < Formula desc "Create Docker hosts locally and on cloud providers" homepage "https://docs.docker.com/machine" url "https://github.com/docker/machine.git", :tag => "v0.12.2", :revision => "937160559e02cc430fe176991beb9a6ffbfe3de0" head "https://github.com/docker/machine.git" bottle do cellar :any_skip_relocation sha256 "dd0033be45240ddb04066254a7cef3b7b35c83b0e70221ac3bb528c9fdb2d393" => :high_sierra sha256 "19af1921876ff7c2851fb4a4a136311ebc44721f0a0faa0db4a976cc5c80d44b" => :sierra sha256 "e8070910f7e34605e0151c8450519c40d06304f488b4186bb09c1a652902186d" => :el_capitan sha256 "3bb173b7cedfc51de9f80791e495957093cdd20cdd5426dfa42fa37b119b49b2" => :yosemite end depends_on "go" => :build depends_on "automake" => :build def install ENV["GOPATH"] = buildpath (buildpath/"src/github.com/docker/machine").install buildpath.children cd "src/github.com/docker/machine" do system "make", "build" bin.install Dir["bin/*"] bash_completion.install Dir["contrib/completion/bash/*.bash"] zsh_completion.install "contrib/completion/zsh/_docker-machine" prefix.install_metafiles end end plist_options :manual => "docker-machine start" def plist; <<-EOS.undent EnvironmentVariables PATH /usr/bin:/bin:/usr/sbin:/sbin:#{HOMEBREW_PREFIX}/bin Label #{plist_name} ProgramArguments #{opt_bin}/docker-machine start default RunAtLoad WorkingDirectory #{HOMEBREW_PREFIX} EOS end test do assert_match version.to_s, shell_output(bin/"docker-machine --version") end end