hg-flow 0.9.8

Also fix the install and add test

Closes Homebrew/homebrew#36957.

Signed-off-by: Xu Cheng <xucheng@me.com>
This commit is contained in:
Xu Cheng 2015-02-19 18:18:27 +08:00
parent dcfb909e12
commit 57a69c2b09

View file

@ -1,19 +1,18 @@
require 'formula'
class HgFlow < Formula
homepage 'https://bitbucket.org/yujiewu/hgflow'
url 'https://bitbucket.org/yujiewu/hgflow/downloads/hgflow-v0.9.6.tar.bz2'
sha1 'f4f71daee139dcee882b9ab199f14b7214167498'
homepage "https://bitbucket.org/yujiewu/hgflow"
url "https://bitbucket.org/yujiewu/hgflow/downloads/hgflow-v0.9.8.tar.bz2"
sha1 "c0fad82a4849533c2832fbbdead299f22ae2d681"
head "http://bitbucket.org/yujiewu/hgflow", :using => :hg, :branch => 'develop'
head "http://bitbucket.org/yujiewu/hgflow", :using => :hg, :branch => "develop"
depends_on :python if MacOS.version <= :snow_leopard
depends_on :hg
def install
if build.head?
(lib/'python2.7/site-packages').install 'src/hgflow.py' => 'hgflow.py'
libexec.install "src/hgflow.py" => "hgflow.py"
else
(lib/'python2.7/site-packages').install 'hgflow.py' => 'hgflow.py'
libexec.install "hgflow.py"
end
end
@ -23,8 +22,21 @@ class HgFlow < Formula
3. For more information go to http://bitbucket.org/yinwm/hgflow
[extensions]
hgflow=
flow = #{opt_prefix}/libexec/hgflow.py
[flow]
autoshelve = true
EOS
end
test do
(testpath/".hgrc").write <<-EOS.undent
[extensions]
flow = #{opt_prefix}/libexec/hgflow.py
[flow]
autoshelve = true
EOS
system "hg", "init"
system "hg", "flow", "init", "-d"
end
end