2015-04-11 18:15:38 +00:00
|
|
|
class Git182Requirement < Requirement
|
2013-12-27 18:11:49 +00:00
|
|
|
fatal true
|
2015-01-11 17:42:20 +00:00
|
|
|
default_formula "git"
|
2013-12-27 18:11:49 +00:00
|
|
|
|
|
|
|
satisfy do
|
2015-01-11 17:42:20 +00:00
|
|
|
system "git stripspace --comment-lines </dev/null 2>/dev/null"
|
2013-12-27 18:11:49 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def message
|
|
|
|
"Your Git is too old. Please upgrade to Git 1.8.2 or newer."
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
class GitIntegration < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Manage git integration branches"
|
2015-06-14 08:09:00 +00:00
|
|
|
homepage "https://johnkeeping.github.io/git-integration/"
|
2015-01-11 17:42:20 +00:00
|
|
|
url "https://github.com/johnkeeping/git-integration/archive/v0.3.tar.gz"
|
2015-06-14 08:09:00 +00:00
|
|
|
sha256 "7fb0a4ed4e4c23b7fa9334abfd1894ed5821b73be144d56d67d926e3cd7a1eb5"
|
|
|
|
head "https://github.com/johnkeeping/git-integration.git"
|
2013-12-27 18:11:49 +00:00
|
|
|
|
2015-06-14 09:08:03 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
|
|
|
sha256 "0a41fd7d3c278edd15c2ba11a0e55dfec44f261a998a8b1392454a7c9a5445f9" => :yosemite
|
|
|
|
sha256 "6d98f63e393b56144ea6754593eb6c77a252c6876c72febef273a15440a8e655" => :mavericks
|
|
|
|
sha256 "c00c4058c45f75f2c455484c19fc9c761316334e53ae3eb928ddaa140ce1e937" => :mountain_lion
|
|
|
|
end
|
|
|
|
|
2015-01-11 17:42:20 +00:00
|
|
|
depends_on "asciidoc" => [:build, :optional]
|
2015-04-11 18:15:38 +00:00
|
|
|
depends_on Git182Requirement
|
2013-12-27 18:11:49 +00:00
|
|
|
|
|
|
|
def install
|
2015-05-11 00:54:34 +00:00
|
|
|
ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog"
|
2013-12-27 18:11:49 +00:00
|
|
|
(buildpath/"config.mak").write "prefix = #{prefix}"
|
|
|
|
system "make", "install"
|
|
|
|
if build.with? "asciidoc"
|
|
|
|
system "make", "install-doc"
|
|
|
|
end
|
|
|
|
system "make", "install-completion"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
system "git", "init"
|
|
|
|
system "git", "commit", "--allow-empty", "-m", "An initial commit"
|
|
|
|
system "git", "checkout", "-b", "branch-a", "master"
|
|
|
|
system "git", "commit", "--allow-empty", "-m", "A commit on branch-a"
|
|
|
|
system "git", "checkout", "-b", "branch-b", "master"
|
|
|
|
system "git", "commit", "--allow-empty", "-m", "A commit on branch-b"
|
|
|
|
system "git", "checkout", "master"
|
|
|
|
system "git", "integration", "--create", "integration"
|
|
|
|
system "git", "integration", "--add", "branch-a"
|
|
|
|
system "git", "integration", "--add", "branch-b"
|
|
|
|
system "git", "integration", "--rebuild"
|
|
|
|
end
|
|
|
|
end
|