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.10.0", :revision => "76ed2a62eabf714bf0a842cda780b034eb0b21c0" head "https://github.com/docker/machine.git" bottle do cellar :any_skip_relocation sha256 "64152e0236b62bb2ab47cc1729e6bc7ad30c33f4c19b9663d69ba9b8cb65e963" => :sierra sha256 "98567ae031dacdd7e5e9af7857d2f1af2cf3be5077b7c774229eeed6ee5d06bf" => :el_capitan sha256 "1d59168031b98f19865162a1a0ec2891809666f0084760ae46a3da6dda451304" => :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