git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Test sdist installation
beb0556Oleg Grenrus
travis/test-install.sh+11−3
@@ -1,13 +1,21 @@
1set -e
1set -e
2
2
3# Check that a source distribution can be successfully generated, and that
3# Check that a source distribution can be successfully generated, and that
4−# the generated source distribution can be installed
4+# the generated source distribution can be installed and tested
5cabal sdist
5cabal sdist
6−if SRC_TGZ="$PWD/dist/$(cabal info . | awk '{print $2;exit}').tar.gz"
6+PKGNAME=$(cabal info . | awk '{print $2;exit}')
7+if SRC_TGZ="$PWD/dist/$PKGNAME.tar.gz"
7then
8then
8 mkdir -p ../install-test
9 mkdir -p ../install-test
9 cd ../install-test
10 cd ../install-test
10 mkdir -p sandboxes/$GHCVER/${STACKAGE:-none}
11 mkdir -p sandboxes/$GHCVER/${STACKAGE:-none}
11 cabal sandbox init --sandbox sandboxes/$GHCVER/${STACKAGE:-none}
12 cabal sandbox init --sandbox sandboxes/$GHCVER/${STACKAGE:-none}
12− cabal install -j2 --ghc-options='+RTS -A32m -RTS' "$SRC_TGZ"
13+
14+ if [ `echo "$STACKAGE" | sed 's/\..*$//'` = "lts-3" ]; then
15+ tar -xzf i--strip-components=1 $PKGNAME.tar.gz
16+ cabal install
17+ cabal test
18+ else
19+ cabal install "$SRC_TGZ"
20+ fi
13fi
21fi