Sha256: f3b79193a707b697e46ed3e1fc1aa01b680e39171c6be1cdc04e55c378632433

Contents?: true

Size: 1.18 KB

Versions: 91

Compression:

Stored size: 1.18 KB

Contents

#!/bin/sh

if [ $# -eq 0 ]; then
    echo "usage: $0 /path/to/exercise"
    exit 1
fi

exercisedir=$(cd "$1" && pwd)
exercisename=$(basename "$exercisedir")
examplename="stub"
xhaskell=$(cd "$(dirname "$0")/.." && pwd)

# We would ideally use a tmpdir here,
# but stack will invalidate its cache if the path changes,
# so the best alternative seems to be to put it in xhaskell.
buildfolder="${xhaskell}/build/${exercisename}/${examplename}"
mkdir -p "${buildfolder}"
cleanup() {
    rm -r "${xhaskell}/build"
}
trap cleanup EXIT INT TERM

cp -R -L ${exercisedir}/stack.yaml ${exercisedir}/package.yaml ${exercisedir}/src ${exercisedir}/test "${buildfolder}"

cd $buildfolder

if [ -n "$TRAVIS" ]; then
    cachedir="$HOME"
else
    cachedir="$xhaskell"
fi
examplecache="${cachedir}/.foldercache/${exercisename}/${examplename}/.stack-work"
mkdir -p "$examplecache"
ln -f -s "$examplecache"

# SET_RESOLVER passed by .travis.yml - sets --resolver if not current.
if [ -f "${exercisedir}/.meta/DONT-TEST-STUB" ]; then
    echo "only building stub"
    stack build ${SET_RESOLVER} --install-ghc --no-terminal
else
    echo "testing stub"
    stack test ${SET_RESOLVER} --install-ghc --no-terminal --no-run-tests
fi

Version data entries

91 entries across 91 versions & 1 rubygems

Version Path
trackler-2.1.0.19 tracks/haskell/bin/test-stub
trackler-2.1.0.18 tracks/haskell/bin/test-stub
trackler-2.1.0.17 tracks/haskell/bin/test-stub
trackler-2.1.0.16 tracks/haskell/bin/test-stub
trackler-2.1.0.15 tracks/haskell/bin/test-stub
trackler-2.1.0.14 tracks/haskell/bin/test-stub
trackler-2.1.0.13 tracks/haskell/bin/test-stub
trackler-2.1.0.12 tracks/haskell/bin/test-stub
trackler-2.1.0.11 tracks/haskell/bin/test-stub
trackler-2.1.0.10 tracks/haskell/bin/test-stub
trackler-2.1.0.9 tracks/haskell/bin/test-stub
trackler-2.1.0.8 tracks/haskell/bin/test-stub
trackler-2.1.0.7 tracks/haskell/bin/test-stub
trackler-2.1.0.6 tracks/haskell/bin/test-stub
trackler-2.1.0.5 tracks/haskell/bin/test-stub
trackler-2.1.0.4 tracks/haskell/bin/test-stub
trackler-2.1.0.3 tracks/haskell/bin/test-stub
trackler-2.1.0.2 tracks/haskell/bin/test-stub
trackler-2.1.0.1 tracks/haskell/bin/test-stub
trackler-2.1.0.0 tracks/haskell/bin/test-stub