2012-01-17 08:14:25 +00:00
|
|
|
class HgFlow < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Development model for mercurial inspired by git-flow"
|
2015-02-19 10:18:27 +00:00
|
|
|
homepage "https://bitbucket.org/yujiewu/hgflow"
|
|
|
|
url "https://bitbucket.org/yujiewu/hgflow/downloads/hgflow-v0.9.8.tar.bz2"
|
2015-08-03 12:55:31 +00:00
|
|
|
sha256 "0078d5a562f7a0e1eaf2b1018de10540c56756d91f5f1c3b1b40b753cbccab95"
|
2015-08-10 18:07:48 +00:00
|
|
|
head "https://bitbucket.org/yujiewu/hgflow", :using => :hg, :branch => "develop"
|
2013-06-07 12:22:15 +00:00
|
|
|
|
2015-10-23 11:15:50 +00:00
|
|
|
bottle :unneeded
|
|
|
|
|
2014-05-01 20:06:37 +00:00
|
|
|
depends_on :python if MacOS.version <= :snow_leopard
|
2015-02-19 10:18:27 +00:00
|
|
|
depends_on :hg
|
2012-01-17 08:14:25 +00:00
|
|
|
|
|
|
|
def install
|
2013-06-07 12:22:15 +00:00
|
|
|
if build.head?
|
2015-02-19 10:18:27 +00:00
|
|
|
libexec.install "src/hgflow.py" => "hgflow.py"
|
2013-06-07 12:22:15 +00:00
|
|
|
else
|
2015-02-19 10:18:27 +00:00
|
|
|
libexec.install "hgflow.py"
|
2013-06-07 12:22:15 +00:00
|
|
|
end
|
2012-01-17 08:14:25 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def caveats; <<-EOS.undent
|
|
|
|
1. Put following lines into your ~/.hgrc
|
|
|
|
2. Restart your shell and try "hg flow".
|
|
|
|
3. For more information go to http://bitbucket.org/yinwm/hgflow
|
|
|
|
|
2013-06-07 12:22:15 +00:00
|
|
|
[extensions]
|
2015-02-19 10:18:27 +00:00
|
|
|
flow = #{opt_prefix}/libexec/hgflow.py
|
|
|
|
[flow]
|
|
|
|
autoshelve = true
|
|
|
|
|
|
|
|
EOS
|
|
|
|
end
|
2012-01-17 08:14:25 +00:00
|
|
|
|
2015-02-19 10:18:27 +00:00
|
|
|
test do
|
|
|
|
(testpath/".hgrc").write <<-EOS.undent
|
|
|
|
[extensions]
|
|
|
|
flow = #{opt_prefix}/libexec/hgflow.py
|
|
|
|
[flow]
|
|
|
|
autoshelve = true
|
2012-01-17 08:14:25 +00:00
|
|
|
EOS
|
2015-02-19 10:18:27 +00:00
|
|
|
system "hg", "init"
|
|
|
|
system "hg", "flow", "init", "-d"
|
2012-01-17 08:14:25 +00:00
|
|
|
end
|
|
|
|
end
|