From 17d95130088462c6b84a51af22123c8478cedfb7 Mon Sep 17 00:00:00 2001 From: Kirill Zaborsky Date: Thu, 7 Feb 2019 16:47:33 +0300 Subject: [PATCH 1/6] Use more correct pruning done in https://github.com/commercialhaskell/stack/pull/4547 --- etc/curator-2-check.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/curator-2-check.sh b/etc/curator-2-check.sh index 82a8facc..6304db21 100755 --- a/etc/curator-2-check.sh +++ b/etc/curator-2-check.sh @@ -6,8 +6,8 @@ mkdir -p ~/.local/bin export PATH=$HOME/.local/bin:$PATH # Get new Stackage curator -CURATOR2=stackage-curator-2-90cf65bfddea4e8abb5bc68fe83d59a7f8766757 -wget "https://s3.amazonaws.com/www.snoyman.com/stackage-curator-2/$CURATOR2.bz2" +CURATOR2=stackage-curator-2-6ec4ac4ee5016e2ecd86af2abfa722b94d2a56c3 +wget "https://download.fpcomplete.com/stackage-curator-2/$CURATOR2.bz2" bunzip2 "$CURATOR2.bz2" chmod +x $CURATOR2 mv $CURATOR2 ~/.local/bin/stackage-curator-2 From b43549d05bf4960872965f1ad06d0f2b1b3db459 Mon Sep 17 00:00:00 2001 From: Kirill Zaborsky Date: Thu, 7 Feb 2019 17:41:52 +0300 Subject: [PATCH 2/6] Setup proper GHC to get boot libraries --- etc/curator-2-check.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/etc/curator-2-check.sh b/etc/curator-2-check.sh index 6304db21..6e9369ee 100755 --- a/etc/curator-2-check.sh +++ b/etc/curator-2-check.sh @@ -2,6 +2,8 @@ set -euxo pipefail +export GHCVER=8.6.3 + mkdir -p ~/.local/bin export PATH=$HOME/.local/bin:$PATH @@ -12,9 +14,12 @@ bunzip2 "$CURATOR2.bz2" chmod +x $CURATOR2 mv $CURATOR2 ~/.local/bin/stackage-curator-2 +# Install GHC +stack setup $GHCVER + # New curator check stackage-curator-2 update && stackage-curator-2 constraints && stackage-curator-2 snapshotincomplete && stackage-curator-2 snapshot && - stackage-curator-2 checksnapshot + stack --resolver ghc-$GHCVER exec stackage-curator-2 checksnapshot From ca4015eaec3e0cf04eccba442cbaf9e4189ddf9e Mon Sep 17 00:00:00 2001 From: Kirill Zaborsky Date: Thu, 7 Feb 2019 18:10:41 +0300 Subject: [PATCH 3/6] Download and install Stack --- etc/curator-2-check.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/etc/curator-2-check.sh b/etc/curator-2-check.sh index 6e9369ee..abafaae6 100755 --- a/etc/curator-2-check.sh +++ b/etc/curator-2-check.sh @@ -4,8 +4,10 @@ set -euxo pipefail export GHCVER=8.6.3 +# Download and unpack the stack executable mkdir -p ~/.local/bin export PATH=$HOME/.local/bin:$PATH +curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack' # Get new Stackage curator CURATOR2=stackage-curator-2-6ec4ac4ee5016e2ecd86af2abfa722b94d2a56c3 From bf0e69bee73c98ed656584a2885a8d3fbadd5c87 Mon Sep 17 00:00:00 2001 From: Kirill Zaborsky Date: Thu, 11 Apr 2019 16:40:31 +0300 Subject: [PATCH 4/6] Use GHC version defined in build-constraints.yaml --- etc/curator-2-check.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/etc/curator-2-check.sh b/etc/curator-2-check.sh index abafaae6..d9759b61 100755 --- a/etc/curator-2-check.sh +++ b/etc/curator-2-check.sh @@ -2,7 +2,8 @@ set -euxo pipefail -export GHCVER=8.6.3 +ETC=$(cd $(dirname $0) ; pwd) +export GHCVER=$(sed -n "s/^ghc-version: \"\(.*\)\"/\1/p" "$ETC/../build-constraints.yaml") # Download and unpack the stack executable mkdir -p ~/.local/bin From 7f50a181d4917b9fb9ee6d2847d6626d58c262f3 Mon Sep 17 00:00:00 2001 From: Kirill Zaborsky Date: Thu, 11 Apr 2019 16:41:08 +0300 Subject: [PATCH 5/6] Use newer Stack/curator versions --- automated/build-next.sh | 4 ++-- etc/curator-2-check.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/automated/build-next.sh b/automated/build-next.sh index fd51f430..bc8e091c 100755 --- a/automated/build-next.sh +++ b/automated/build-next.sh @@ -61,7 +61,7 @@ BINDIR=$(cd $ROOT/bin ; pwd) ( cd $BINDIR rm -f stackage-curator stackage-curator-2*.bz2 -CURATOR2=stackage-curator-2-401883a889b06e0a2ac772fac7abcc743d5a00e2 +CURATOR2=stackage-curator-2-7e65b644121812d9a3a8b24d7130bb8865485f8f wget "https://download.fpcomplete.com/stackage-curator-2/$CURATOR2.bz2" bunzip2 "$CURATOR2.bz2" chmod +x $CURATOR2 @@ -90,7 +90,7 @@ fi ( cd $BINDIR rm -f stack stack-*.bz2 -STACK=stack-401883a889b06e0a2ac772fac7abcc743d5a00e2 +STACK=stack-7e65b644121812d9a3a8b24d7130bb8865485f8f wget "https://download.fpcomplete.com/stackage-curator-2/$STACK.bz2" bunzip2 "$STACK.bz2" chmod +x $STACK diff --git a/etc/curator-2-check.sh b/etc/curator-2-check.sh index d9759b61..a40874d1 100755 --- a/etc/curator-2-check.sh +++ b/etc/curator-2-check.sh @@ -11,7 +11,7 @@ export PATH=$HOME/.local/bin:$PATH curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack' # Get new Stackage curator -CURATOR2=stackage-curator-2-6ec4ac4ee5016e2ecd86af2abfa722b94d2a56c3 +CURATOR2=stackage-curator-2-7e65b644121812d9a3a8b24d7130bb8865485f8f wget "https://download.fpcomplete.com/stackage-curator-2/$CURATOR2.bz2" bunzip2 "$CURATOR2.bz2" chmod +x $CURATOR2 From ab3829793d29d42ff6f3cec0d775c171d5321d71 Mon Sep 17 00:00:00 2001 From: Kirill Zaborsky Date: Fri, 12 Apr 2019 14:13:32 +0300 Subject: [PATCH 6/6] Hyphenated commands and target argument for constraints command --- etc/curator-2-check.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/etc/curator-2-check.sh b/etc/curator-2-check.sh index a40874d1..beddaf39 100755 --- a/etc/curator-2-check.sh +++ b/etc/curator-2-check.sh @@ -20,9 +20,12 @@ mv $CURATOR2 ~/.local/bin/stackage-curator-2 # Install GHC stack setup $GHCVER +# curator's constraint command has target as a required parameter +# because of a different constraints handling in minor LTS version bumps +NIGHTLY="nightly-$(date +%Y-%m-%d)" # New curator check stackage-curator-2 update && - stackage-curator-2 constraints && - stackage-curator-2 snapshotincomplete && + stackage-curator-2 constraints --target=$NIGHTLY && + stackage-curator-2 snapshot-incomplete && stackage-curator-2 snapshot && - stack --resolver ghc-$GHCVER exec stackage-curator-2 checksnapshot + stack --resolver ghc-$GHCVER exec stackage-curator-2 check-snapshot