Resolve stackage name via stackage.org
authorJoachim Breitner <mail@joachim-breitner.de>
Tue, 7 Jun 2016 11:24:30 +0000 (11:24 +0000)
committerJoachim Breitner <mail@joachim-breitner.de>
Tue, 7 Jun 2016 11:24:30 +0000 (11:24 +0000)
.travis.yml

index 4edb11a..ba029f6 100644 (file)
@@ -30,12 +30,12 @@ before_install:
  - test -z "$WINDOWS"  || bash ./.travis-setup-windows.sh
  - test -z "$CABALVER" || bash ./.travis-setup-linux.sh
  - test -z "$STACK" || sudo apt-get install g++ gcc libc6-dev libffi-dev libgmp-dev make xz-utils zlib1g-dev
- - test -z "$STACK" || stack setup --resolver $STACK
-
+ - 'test -z "$STACK" || RESOLVER="$(HEAD -S https://www.stackage.org/$STACK|grep HEAD|tail -n1|cut -d/ -f4)"'
+ - test -z "$STACK" || stack setup --resolver $RESOLVER
 
 install:
- - 'test -z "$STACK" || echo "resolver: lts-1.0" > stack.yaml # dummy value'
- - test -z "$STACK" || stack solver --update-config --resolver "$STACK"
+ - 'test -z "$STACK" || echo "resolver: $RESOLVER" > stack.yaml'
+ - test -z "$STACK" || stack solver --update-config
  - test -z "$STACK" || stack build --only-dependencies
 
 script: