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.16.1", :revision => "cce350d75c529cf6e77328d9dd0477357e04a776" head "https://github.com/docker/machine.git" bottle do cellar :any_skip_relocation sha256 "a039c02209a33f24fe08eb19a9a1b62050094ffbefac4d14f503256bdd563239" => :mojave sha256 "c96f4ce5a408afabbe1fb7d9ab5fa103a3dffbae5b4f6253a8e328b817a068a2" => :high_sierra sha256 "03243f9afedc25d7e3f519749639bd873bc27ef109e05aa8d86785b196d8dcc4" => :sierra end depends_on "automake" => :build depends_on "go" => :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 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