put in workaround for strange version of git on the autobuilder

This commit is contained in:
Joey Hess 2015-04-14 14:44:19 -04:00
parent eebd62d2bc
commit 5871f7abd2
2 changed files with 13 additions and 10 deletions

View file

@ -94,12 +94,15 @@ getUpgradeLocation = do
return $ Config "upgradelocation" $ MaybeStringConfig e
getGitVersion :: Test
getGitVersion = do
v <- Git.Version.installed
let oldestallowed = Git.Version.normalize "1.7.1.0"
when (v < oldestallowed) $
error $ "installed git version " ++ show v ++ " is too old! (Need " ++ show oldestallowed ++ " or newer)"
return $ Config "gitversion" $ StringConfig $ show v
getGitVersion = go =<< getEnv "FORCE_GIT_VERSION"
where
go (Just s) = return $ Config "gitversion" $ StringConfig s
go Nothing = do
v <- Git.Version.installed
let oldestallowed = Git.Version.normalize "1.7.1.0"
when (v < oldestallowed) $
error $ "installed git version " ++ show v ++ " is too old! (Need " ++ show oldestallowed ++ " or newer)"
return $ Config "gitversion" $ StringConfig $ show v
checkWgetQuietProgress :: Test
checkWgetQuietProgress = Config "wgetquietprogress" . BoolConfig

View file

@ -11,10 +11,6 @@ set -e
PATH="/c/Program Files (x86)/NSIS:/c/msysgit/cmd:/c/msysgit/bin:$PATH"
git --version || true
which git || true
/c/msysgit/cmd/git --version || true
# Run a command with the cygwin environment available.
# However, programs not from cygwin are preferred.
withcyg () {
@ -27,6 +23,10 @@ withcygpreferred () {
# This tells git-annex where to upgrade itself from.
UPGRADE_LOCATION=http://downloads.kitenet.net/git-annex/windows/current/git-annex-installer.exe
# This can be used to force git-annex to build supporting a particular
# version of git, instead of the version installed at build time.
FORCE_GIT_VERSION=1.9.5
# Uncomment to get rid of cabal installed libraries.
#rm -rf /c/Users/jenkins/AppData/Roaming/cabal /c/Users/jenkins/AppData/Roaming/ghc