fish: disable shallow cloning for HEAD.

fish needs a deep clone in order to calculate its version. With the
shallow clone, the version is left as "unknown".

Also set GIT_DIR so fish can actually see the git history.

Closes Homebrew/homebrew#33655.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
master
Kevin Ballard 2014-10-27 15:20:46 -07:00 committed by Mike McQuaid
parent 561ce1ccb1
commit 5b847a089d
1 changed files with 5 additions and 2 deletions

View File

@ -12,7 +12,7 @@ class Fish < Formula
end
head do
url "https://github.com/fish-shell/fish-shell.git"
url "https://github.com/fish-shell/fish-shell.git", :shallow => false
depends_on :autoconf
# Indeed, the head build always builds documentation
@ -22,7 +22,10 @@ class Fish < Formula
skip_clean "share/doc"
def install
system "autoconf" if build.head?
if build.head?
ENV['GIT_DIR'] = cached_download/'.git'
system "autoconf"
end
# In Homebrew's 'superenv' sed's path will be incompatible, so
# the correct path is passed into configure here.
system "./configure", "--prefix=#{prefix}", "SED=/usr/bin/sed"