class Docker < Formula desc "Pack, ship and run any application as a lightweight container" homepage "https://www.docker.com/" url "https://github.com/docker/docker.git", :tag => "v1.13.1", :revision => "092cba3727bb9b4a2f0e922cd6c0f93ea270e363" head "https://github.com/docker/docker.git" bottle do cellar :any_skip_relocation sha256 "e48ab4e9376cfa5bb7ddf3c602ab3773feb53534070971a682eaf8f430482f72" => :sierra sha256 "173a12537cb3b9087c16dd6d38280f2d51f8388bf74e0d0e487faaae023404c2" => :el_capitan sha256 "f6ad85796334dc1c385c1958e7da2b10dfeecb0e85a53bdae5329508acc27a29" => :yosemite end option "with-experimental", "Enable experimental features" option "without-completions", "Disable bash/zsh completions" depends_on "go" => :build if build.with? "experimental" depends_on "libtool" => :run depends_on "yubico-piv-tool" => :recommended end def install ENV["AUTO_GOPATH"] = "1" ENV["DOCKER_EXPERIMENTAL"] = "1" if build.with? "experimental" system "hack/make.sh", "dynbinary-client" build_version = build.head? ? File.read("VERSION").chomp : version bin.install "bundles/#{build_version}/dynbinary-client/docker-#{build_version}" => "docker" if build.with? "completions" bash_completion.install "contrib/completion/bash/docker" fish_completion.install "contrib/completion/fish/docker.fish" zsh_completion.install "contrib/completion/zsh/_docker" end end test do system "#{bin}/docker", "--version" end end