aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJingwen Owen Ou2014-04-29 07:40:09 -0700
committerMike McQuaid2014-05-01 09:36:16 +0100
commit43a4ed6545b37152aefdd8a6b4a52d16f91a306c (patch)
tree4b0e3f69a83e7ef070c0e2f9d3701ce914988fe5
parent9362781dd8822650b7e3714cff5d1aa004f116d3 (diff)
downloadhomebrew-43a4ed6545b37152aefdd8a6b4a52d16f91a306c.tar.bz2
gh 2.1.0 (new formula) - GitHub CLI.
Closes #28829. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
-rw-r--r--Library/Formula/gh.rb31
1 files changed, 31 insertions, 0 deletions
diff --git a/Library/Formula/gh.rb b/Library/Formula/gh.rb
new file mode 100644
index 000000000..9dde6812b
--- /dev/null
+++ b/Library/Formula/gh.rb
@@ -0,0 +1,31 @@
+require "formula"
+
+class Gh < Formula
+ homepage "https://github.com/jingweno/gh"
+ url "https://github.com/jingweno/gh/archive/v2.1.0.tar.gz"
+ sha1 "0673343542fedd6780bdb1d5a773c45f35a9ab28"
+ head "https://github.com/jingweno/gh.git"
+
+ bottle do
+ end
+
+ depends_on "go" => :build
+
+ option "without-completions", "Disable bash/zsh completions"
+
+ def install
+ system "script/make", "--no-update"
+ bin.install "gh"
+
+ if build.with? "completions"
+ bash_completion.install "etc/gh.bash_completion.sh"
+ zsh_completion.install "etc/gh.zsh_completion" => "_gh"
+ end
+ end
+
+ test do
+ HOMEBREW_REPOSITORY.cd do
+ assert_equal 'bin/brew', `#{bin}/gh ls-files -- bin`.strip
+ end
+ end
+end