diff --git a/travis-CI/sh-lib b/travis-CI/sh-lib index 934ce140..5ece6f53 100644 --- a/travis-CI/sh-lib +++ b/travis-CI/sh-lib @@ -61,3 +61,11 @@ EOF esac set -x } + +show_stack_pkgs() { + echo packages: + for d in $dirs ; do + echo " - ${d}/" + done + echo '' +} diff --git a/travis-CI/stack/install.sh b/travis-CI/stack/install.sh index 32e3c1e9..7cafa32a 100755 --- a/travis-CI/stack/install.sh +++ b/travis-CI/stack/install.sh @@ -11,20 +11,13 @@ skip_no_match_branch checkout_root=$(pwd) -install_package() { +( + show_stack_pkgs sed "s/^resolver: .*/resolver: ${STACK_RESOLVER}/" \ < $checkout_root/travis-CI/stack/template.yaml \ - > stack-travis.yaml - ## stack.yaml must be located the same directory which has *.cabal -- constraint of stack? +) > stack-travis.yaml - STACK_YAML=stack-travis.yaml stack setup - STACK_YAML=stack-travis.yaml stack install --only-dependencies -} +cat stack-travis.yaml -if [ x"$dirs" = x ]; then - install_package -else - for d in $dirs; do - ( cd $d && install_package ) - done -fi +STACK_YAML=stack-travis.yaml stack setup +STACK_YAML=stack-travis.yaml stack install --only-dependencies diff --git a/travis-CI/stack/script.sh b/travis-CI/stack/script.sh index 8eaf574b..487a5448 100755 --- a/travis-CI/stack/script.sh +++ b/travis-CI/stack/script.sh @@ -9,15 +9,5 @@ set -x skip_no_match_branch -script_build() { - STACK_YAML=stack-travis.yaml stack build - STACK_YAML=stack-travis.yaml stack test -} - -if [ x"$dirs" = x ]; then - script_build -else - for d in $dirs; do - ( cd $d && script_build ) - done -fi +STACK_YAML=stack-travis.yaml stack build +STACK_YAML=stack-travis.yaml stack test diff --git a/travis-CI/stack/template.yaml b/travis-CI/stack/template.yaml index 4286e4cc..a0b5ed8c 100644 --- a/travis-CI/stack/template.yaml +++ b/travis-CI/stack/template.yaml @@ -1,8 +1,5 @@ resolver: #foo -packages: -- '.' - extra-deps: [] flags: {} extra-package-dbs: []