通常情况下,有时您会遇到某些软件的旧版本。但是你仍然希望能够使用自制软件无缝地安装它。在我的公司,我们坚持使用旧版本的docker,所以我从旧版本的docker Formula创建了自己的tap。
class Docker191 < 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.9.1",
:revision => "a34a1d598c6096ed8b5ce5219e77d68e5cd85462"
revision 1
head "https://github.com/docker/docker.git"
bottle do
cellar :any_skip_relocation
root_url "https://homebrew.bintray.com/bottles"
sha256 "fe02c921afd6863be441b85ae069e24b7c5b13e97615b47c994ea8064e082bf1" => :el_capitan
sha256 "8a3137f5d6155491e9c4833d80ca819d8bf6d31f38595be713baed06f5283c92" => :yosemite
sha256 "282f987005f81d9a82269827b66aa1044dfbd8645c23845d59e21aad93dc99e0" => :mavericks
end
option "without-completions", "Disable bash/zsh completions"
depends_on "go" => :build
conflicts_with "docker", :because => "Differing version of the same formula"
def install
ENV["AUTO_GOPATH"] = "1"
ENV["DOCKER_CLIENTONLY"] = "1"
system "hack/make.sh", "dynbinary"
build_version = build.head? ? File.read("VERSION").chomp : version
bin.install "bundles/#{build_version}/dynbinary/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
这一切都从源头建立得很好,但我想知道是否有可能拉出已经建造并在bintray中提供的瓶子,而不是从源头建造。
我尝试添加
root_url&#34; https://homebrew.bintray.com/bottles&#34;
但是因为我的公式名称是Docker191而不仅仅是Docker,它试图从不存在的路径中拉出来
==&GT;正在下载https://homebrew.bintray.com/bottles/docker191-1.9.1_1.el_capitan.bottle.tar.gz
而不是
==&GT;正在下载https://homebrew.bintray.com/bottles/docker-1.9.1_1.el_capitan.bottle.tar.gz
还有办法修理瓶子名称吗?我无法将公式的名称更改为Docker,因为我需要多个版本才可用。