From ba6258aad9ac3d2a0778a95a96d97b17a87c0f65 Mon Sep 17 00:00:00 2001 From: Daniel Gröber Date: Fri, 16 Aug 2019 22:56:46 +0200 Subject: Fix check-testdata script --- scripts/ci/check-testdata.sh | 6 ++++-- scripts/ci/update-stack-resolvers.sh | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'scripts/ci') diff --git a/scripts/ci/check-testdata.sh b/scripts/ci/check-testdata.sh index 9e2182d..b529354 100755 --- a/scripts/ci/check-testdata.sh +++ b/scripts/ci/check-testdata.sh @@ -1,5 +1,7 @@ #!/bin/bash +CI_PROJECT_DIR=${CI_PROJECT_DIR:-.} + set -e -o pipefail echo "=== Stack resolvers" @@ -7,12 +9,12 @@ echo "=== Stack resolvers" $CI_PROJECT_DIR/scripts/ci/update-stack-resolvers.sh \ | tee tests/stack-resolvers.new -git diff --exit-code -- tests/stack-resolvers tests/stack-resolvers.new \ +diff --from-file=tests/stack-resolvers tests/stack-resolvers.new \ && echo OK echo; echo; echo "=== Cabal versions" $CI_PROJECT_DIR/scripts/ci/update-cabal-versions.sh \ | tee tests/cabal-versions.new -git diff --exit-code -- tests/cabal-versions tests/cabal-versions.new \ +diff --from-file=tests/cabal-versions tests/cabal-versions.new \ && echo OK diff --git a/scripts/ci/update-stack-resolvers.sh b/scripts/ci/update-stack-resolvers.sh index d0dacd1..4a20c14 100755 --- a/scripts/ci/update-stack-resolvers.sh +++ b/scripts/ci/update-stack-resolvers.sh @@ -13,10 +13,11 @@ resolvers=$(cat /tmp/stack-resolvers/snapshots.json \ for res in $resolvers; do wget -q --continue \ -O /tmp/stack-resolvers/$res.yaml \ - https://raw.githubusercontent.com/fpco/lts-haskell/master/$res.yaml + https://raw.githubusercontent.com/commercialhaskell/lts-haskell/master/$res.yaml ghc=$(cat /tmp/stack-resolvers/$res.yaml \ | grep ghc-version | awk '{ print $2 }' | tr -cd '0-9.') + [ -z "$ghc" ] && continue printf '%-10s %s\n' "$ghc" "$res" done -- cgit v1.2.3