git-flow: fix head resource and better test

This commit is contained in:
Xu Cheng 2015-10-21 14:53:06 +08:00
parent 72dae86724
commit 9cd2c21eb4

View file

@ -1,8 +1,16 @@
class GitFlowAvh < Formula
desc "AVH edition of git-flow"
homepage "https://github.com/petervanderdoes/gitflow-avh"
url "https://github.com/petervanderdoes/gitflow-avh/archive/1.9.1.tar.gz"
sha256 "7692c77744663c5243cdd390bef0a621caee92dde228b50ef97149fc1b54780d"
stable do
url "https://github.com/petervanderdoes/gitflow-avh/archive/1.9.1.tar.gz"
sha256 "7692c77744663c5243cdd390bef0a621caee92dde228b50ef97149fc1b54780d"
resource "completion" do
url "https://github.com/petervanderdoes/git-flow-completion/archive/0.5.1.tar.gz"
sha256 "5c8547a549dc623a8d57cfc22c3fa88588f5630da9dc6de9638e5b69da9d47d0"
end
end
bottle do
cellar :any_skip_relocation
@ -19,11 +27,6 @@ class GitFlowAvh < Formula
end
end
resource "completion" do
url "https://github.com/petervanderdoes/git-flow-completion/archive/0.5.1.tar.gz"
sha256 "5c8547a549dc623a8d57cfc22c3fa88588f5630da9dc6de9638e5b69da9d47d0"
end
depends_on "gnu-getopt"
conflicts_with "git-flow"
@ -43,6 +46,9 @@ class GitFlowAvh < Formula
end
test do
system "#{bin}/git-flow", "version"
system "git", "init"
system "#{bin}/git-flow", "init", "-d"
system "#{bin}/git-flow", "config"
assert_equal "develop", shell_output("git symbolic-ref --short HEAD").chomp
end
end