2011-03-10 05:11:03 +00:00
|
|
|
class Hub < Formula
|
2015-01-14 08:41:54 +00:00
|
|
|
homepage "http://hub.github.com/"
|
|
|
|
url "https://github.com/github/hub/archive/v1.12.4.tar.gz"
|
|
|
|
sha1 "25135167108cd777ba6ec2dd5a9a25e248d98d4b"
|
2014-10-20 22:03:44 +00:00
|
|
|
|
|
|
|
head do
|
2014-12-03 22:44:40 +00:00
|
|
|
url "https://github.com/github/hub.git"
|
2014-10-20 22:03:44 +00:00
|
|
|
depends_on "go" => :build
|
|
|
|
end
|
2012-11-22 18:58:28 +00:00
|
|
|
|
2015-01-14 08:41:54 +00:00
|
|
|
devel do
|
|
|
|
url "https://github.com/github/hub/archive/v2.2.0-rc1.tar.gz"
|
|
|
|
sha1 "029d154ce0f9c4999e4dd6ef23eab5e411370c4f"
|
|
|
|
version "2.2.0-rc1"
|
|
|
|
|
|
|
|
depends_on "go" => :build
|
|
|
|
end
|
|
|
|
|
|
|
|
option "without-completions", "Disable bash/zsh completions"
|
2013-12-22 01:18:21 +00:00
|
|
|
|
2009-12-11 16:13:57 +00:00
|
|
|
def install
|
2015-01-14 08:41:54 +00:00
|
|
|
if build.head? || build.devel?
|
2014-12-25 21:25:39 +00:00
|
|
|
ENV["GIT_DIR"] = cached_download/".git"
|
2014-10-20 22:03:44 +00:00
|
|
|
system "script/build"
|
|
|
|
bin.install "hub"
|
|
|
|
else
|
|
|
|
rake "install", "prefix=#{prefix}"
|
|
|
|
end
|
2013-12-22 01:18:21 +00:00
|
|
|
|
2015-01-14 08:41:54 +00:00
|
|
|
if build.with? "completions"
|
|
|
|
bash_completion.install "etc/hub.bash_completion.sh"
|
|
|
|
zsh_completion.install "etc/hub.zsh_completion" => "_hub"
|
2013-12-22 01:18:21 +00:00
|
|
|
end
|
2012-03-20 22:51:50 +00:00
|
|
|
end
|
|
|
|
|
2013-01-27 22:38:17 +00:00
|
|
|
test do
|
|
|
|
HOMEBREW_REPOSITORY.cd do
|
2014-05-04 19:12:41 +00:00
|
|
|
assert_equal "bin/brew", shell_output("#{bin}/hub ls-files -- bin").strip
|
2012-07-06 08:37:57 +00:00
|
|
|
end
|
|
|
|
end
|
2009-12-11 16:13:57 +00:00
|
|
|
end
|