2013-05-28 19:28:01 +04:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Gh < Formula
|
2013-06-11 19:25:32 +04:00
|
|
|
VERSION = '0.6.0'
|
2013-05-28 20:01:55 +04:00
|
|
|
ARCH = if MacOS.prefer_64_bit?
|
|
|
|
'amd64'
|
|
|
|
else
|
|
|
|
'386'
|
|
|
|
end
|
2013-05-28 19:28:01 +04:00
|
|
|
|
|
|
|
homepage 'https://github.com/jingweno/gh'
|
|
|
|
version VERSION
|
2013-05-28 20:01:55 +04:00
|
|
|
url "https://drone.io/github.com/jingweno/gh/files/target/#{VERSION}-snapshot/darwin_#{ARCH}/gh_#{VERSION}-snapshot_darwin_#{ARCH}.tar.gz"
|
2013-05-28 19:28:01 +04:00
|
|
|
head 'https://github.com/jingweno/gh.git'
|
|
|
|
|
|
|
|
def install
|
|
|
|
bin.install 'gh'
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
`#{bin}/gh version`.chomp == VERSION
|
|
|
|
end
|
|
|
|
end
|