aboutsummaryrefslogtreecommitdiff
path: root/scripts/ci
diff options
context:
space:
mode:
authorDaniel Gröber <dxld@darkboxed.org>2019-06-19 00:49:38 +0200
committerDaniel Gröber <dxld@darkboxed.org>2019-06-19 01:53:29 +0200
commit97d8c5384b90b88ead7cddbf0c8cf63021b2fed9 (patch)
tree5e418222e8726e2b8a3e37b2b19f395839306263 /scripts/ci
parentedf99c36d2aa8cd7311234d1f134d2b8db246ac0 (diff)
compile-test: Read cabal versions from file
This allows them to be checked for up-to-date'nes in CI like the stack-resolvers.
Diffstat (limited to 'scripts/ci')
-rwxr-xr-xscripts/ci/check-testdata.sh18
-rwxr-xr-xscripts/ci/update-cabal-versions.sh6
2 files changed, 24 insertions, 0 deletions
diff --git a/scripts/ci/check-testdata.sh b/scripts/ci/check-testdata.sh
new file mode 100755
index 0000000..9e2182d
--- /dev/null
+++ b/scripts/ci/check-testdata.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+set -e -o pipefail
+
+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 \
+ && 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 \
+ && echo OK
diff --git a/scripts/ci/update-cabal-versions.sh b/scripts/ci/update-cabal-versions.sh
new file mode 100755
index 0000000..52dd5d2
--- /dev/null
+++ b/scripts/ci/update-cabal-versions.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+# Example:
+# $ scripts/ci/update-cabal-versions.sh | tee tests/cabal-versions
+
+wget -q -O- https://hackage.haskell.org/package/Cabal/preferred.json \
+ | jq -r '."normal-version"[]' | sort -V