aboutsummaryrefslogtreecommitdiff
path: root/scripts/ci
diff options
context:
space:
mode:
authorDaniel Gröber <dxld@darkboxed.org>2019-08-16 22:56:46 +0200
committerDaniel Gröber (dxld) <dxld@darkboxed.org>2019-09-17 17:48:26 +0200
commitba6258aad9ac3d2a0778a95a96d97b17a87c0f65 (patch)
tree40eeb0c482391b169a7d233b6d5b5cb89c4afb32 /scripts/ci
parentd19e59312f3a6648bd53d489c60ec11b73289f40 (diff)
Fix check-testdata script
Diffstat (limited to 'scripts/ci')
-rwxr-xr-xscripts/ci/check-testdata.sh6
-rwxr-xr-xscripts/ci/update-stack-resolvers.sh3
2 files changed, 6 insertions, 3 deletions
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