diff options
| author | Matt McClure | 2013-12-27 13:11:49 -0500 | 
|---|---|---|
| committer | Mike McQuaid | 2014-01-04 16:48:49 +0000 | 
| commit | 83f78de9c4fe6eb72a10f8496c205d08156c8903 (patch) | |
| tree | ce692c54b03ca85f8377b73f118d0fcf30e510db | |
| parent | b9a50fd7971d20520eedc513e79cdb55cd89d82f (diff) | |
| download | homebrew-83f78de9c4fe6eb72a10f8496c205d08156c8903.tar.bz2 | |
git-integration 0.2 (new formula)
Closes #25186.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
| -rw-r--r-- | Library/Formula/git-integration.rb | 47 | 
1 files changed, 47 insertions, 0 deletions
| diff --git a/Library/Formula/git-integration.rb b/Library/Formula/git-integration.rb new file mode 100644 index 000000000..1dc909ded --- /dev/null +++ b/Library/Formula/git-integration.rb @@ -0,0 +1,47 @@ +require 'formula' + +class SufficientlyRecentGit < Requirement +  fatal true +  default_formula 'git' + +  satisfy do +    system 'git stripspace --comment-lines </dev/null 2>/dev/null' +  end + +  def message +    "Your Git is too old.  Please upgrade to Git 1.8.2 or newer." +  end +end + +class GitIntegration < Formula +  homepage 'http://johnkeeping.github.io/git-integration/' +  url 'https://github.com/johnkeeping/git-integration/archive/v0.2.zip' +  sha1 'ce86564077a683c8ce270c85530f9100f3f8c950' + +  depends_on 'asciidoc' => [:build, :optional] +  depends_on SufficientlyRecentGit + +  def install +    ENV["XML_CATALOG_FILES"] = "#{HOMEBREW_PREFIX}/etc/xml/catalog" +    (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 | 
