summaryrefslogtreecommitdiff
path: root/standalone
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-05-19 20:35:33 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-05-19 20:35:33 -0400
commitbe75f7478ccf5c11505dc2f2b20377f734633303 (patch)
tree18030e043cae6669fccbb88d490e9ca01c207eb9 /standalone
parenteee6fc0d718fd2b43e38729813111512f94bdd48 (diff)
do a clean build if incremental fails
Diffstat (limited to 'standalone')
-rw-r--r--standalone/windows/build.sh26
1 files changed, 18 insertions, 8 deletions
diff --git a/standalone/windows/build.sh b/standalone/windows/build.sh
index 81e66f292..230ffd246 100644
--- a/standalone/windows/build.sh
+++ b/standalone/windows/build.sh
@@ -35,14 +35,24 @@ cd ..
cabal install --only-dependencies -f"$FLAGS"
-# Build git-annex
-withcyg cabal configure -f"$FLAGS"
-withcyg cabal build
-
-# Build the installer
-cabal install nsis
-ghc --make Build/NullSoftInstaller.hs
-withcyg Build/NullSoftInstaller.exe
+runbuild () {
+ # Build git-annex
+ withcyg cabal configure -f"$FLAGS"
+ withcyg cabal build
+
+ # Build the installer
+ cabal install nsis
+ ghc --make Build/NullSoftInstaller.hs
+ withcyg Build/NullSoftInstaller.exe
+}
+
+# Incremental build sometimes may fail, possibly because the configure
+# script has changed but cabal neglects to re-build it on Windows
+if ! runbuild; then
+ echo "Retrying after cabal clean"
+ cabal clean
+ runbuild
+fi
# Test git-annex
rm -rf .t