@@ -2,19 +2,30 @@
22
33set -euxo pipefail
44
5+ETC=$(cd $(dirname $0) ; pwd)
6+export GHCVER=$(sed -n "s/^ghc-version: \"\(.*\)\"/\1/p" "$ETC/../build-constraints.yaml")
7+
8+# Download and unpack the stack executable
59mkdir -p ~/.local/bin
610export PATH=$HOME/.local/bin:$PATH
11+curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
712
813# Get new Stackage curator
9−CURATOR2=stackage-curator-2-90cf65bfddea4e8abb5bc68fe83d59a7f8766757
10−wget "https://s3.amazonaws.com/www.snoyman.com/stackage-curator-2/$CURATOR2.bz2"
14+CURATOR2=stackage-curator-2-7e65b644121812d9a3a8b24d7130bb8865485f8f
15+wget "https://download.fpcomplete.com/stackage-curator-2/$CURATOR2.bz2"
1116bunzip2 "$CURATOR2.bz2"
1217chmod +x $CURATOR2
1318mv $CURATOR2 ~/.local/bin/stackage-curator-2
1419
20+# Install GHC
21+stack setup $GHCVER
22+
23+# curator's constraint command has target as a required parameter
24+# because of a different constraints handling in minor LTS version bumps
25+NIGHTLY="nightly-$(date +%Y-%m-%d)"
1526# New curator check
1627stackage-curator-2 update &&
17− stackage-curator-2 constraints &&
18− stackage-curator-2 snapshotincomplete &&
28+ stackage-curator-2 constraints --target=$NIGHTLY &&
29+ stackage-curator-2 snapshot-incomplete &&
1930 stackage-curator-2 snapshot &&
20− stackage-curator-2 checksnapshot
31+ stack --resolver ghc-$GHCVER exec stackage-curator-2 check-snapshot