on master help sign in
Merge pull request #4360 from qrilka/proper-pruning
a05d88cDan Burton
automated/build-next.sh+2−2
@@ -61,7 +61,7 @@ BINDIR=$(cd $ROOT/bin ; pwd)
61(
61(
62cd $BINDIR
62cd $BINDIR
63rm -f stackage-curator stackage-curator-2*.bz2
63rm -f stackage-curator stackage-curator-2*.bz2
64−CURATOR2=stackage-curator-2-401883a889b06e0a2ac772fac7abcc743d5a00e2
64+CURATOR2=stackage-curator-2-7e65b644121812d9a3a8b24d7130bb8865485f8f
65wget "https://download.fpcomplete.com/stackage-curator-2/$CURATOR2.bz2"
65wget "https://download.fpcomplete.com/stackage-curator-2/$CURATOR2.bz2"
66bunzip2 "$CURATOR2.bz2"
66bunzip2 "$CURATOR2.bz2"
67chmod +x $CURATOR2
67chmod +x $CURATOR2
@@ -90,7 +90,7 @@ fi
90(
90(
91cd $BINDIR
91cd $BINDIR
92rm -f stack stack-*.bz2
92rm -f stack stack-*.bz2
93−STACK=stack-401883a889b06e0a2ac772fac7abcc743d5a00e2
93+STACK=stack-7e65b644121812d9a3a8b24d7130bb8865485f8f
94wget "https://download.fpcomplete.com/stackage-curator-2/$STACK.bz2"
94wget "https://download.fpcomplete.com/stackage-curator-2/$STACK.bz2"
95bunzip2 "$STACK.bz2"
95bunzip2 "$STACK.bz2"
96chmod +x $STACK
96chmod +x $STACK
etc/curator-2-check.sh+16−5
@@ -2,19 +2,30 @@
2
2
3set -euxo pipefail
3set -euxo pipefail
4
4
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
5mkdir -p ~/.local/bin
9mkdir -p ~/.local/bin
6export PATH=$HOME/.local/bin:$PATH
10export 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'
7
12
8# Get new Stackage curator
13# Get new Stackage curator
9−CURATOR2=stackage-curator-2-90cf65bfddea4e8abb5bc68fe83d59a7f8766757
14+CURATOR2=stackage-curator-2-7e65b644121812d9a3a8b24d7130bb8865485f8f
10−wget "https://s3.amazonaws.com/www.snoyman.com/stackage-curator-2/$CURATOR2.bz2"
15+wget "https://download.fpcomplete.com/stackage-curator-2/$CURATOR2.bz2"
11bunzip2 "$CURATOR2.bz2"
16bunzip2 "$CURATOR2.bz2"
12chmod +x $CURATOR2
17chmod +x $CURATOR2
13mv $CURATOR2 ~/.local/bin/stackage-curator-2
18mv $CURATOR2 ~/.local/bin/stackage-curator-2
14
19
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)"
15# New curator check
26# New curator check
16stackage-curator-2 update &&
27stackage-curator-2 update &&
17− stackage-curator-2 constraints &&
28+ stackage-curator-2 constraints --target=$NIGHTLY &&
18− stackage-curator-2 snapshotincomplete &&
29+ stackage-curator-2 snapshot-incomplete &&
19 stackage-curator-2 snapshot &&
30 stackage-curator-2 snapshot &&
20− stackage-curator-2 checksnapshot
31+ stack --resolver ghc-$GHCVER exec stackage-curator-2 check-snapshot