diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-04-14 14:44:19 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-04-14 14:44:19 -0400 |
commit | 86a86ad53f59caf9c6e6b0ba2ce5ca1f27660521 (patch) | |
tree | f6313370ee3eac0667677faee3e5e4faf0e6f54c | |
parent | 34abcdb647d665a85a5607b0b4441224aae655df (diff) |
put in workaround for strange version of git on the autobuilder
-rw-r--r-- | Build/Configure.hs | 15 | ||||
-rwxr-xr-x | standalone/windows/build.sh | 8 |
2 files changed, 13 insertions, 10 deletions
diff --git a/Build/Configure.hs b/Build/Configure.hs index 4498838a1..c90231b29 100644 --- a/Build/Configure.hs +++ b/Build/Configure.hs @@ -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 diff --git a/standalone/windows/build.sh b/standalone/windows/build.sh index 4368c36c6..99c8418f0 100755 --- a/standalone/windows/build.sh +++ b/standalone/windows/build.sh @@ -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 |