From 97d8c5384b90b88ead7cddbf0c8cf63021b2fed9 Mon Sep 17 00:00:00 2001 From: Daniel Gröber Date: Wed, 19 Jun 2019 00:49:38 +0200 Subject: compile-test: Read cabal versions from file This allows them to be checked for up-to-date'nes in CI like the stack-resolvers. --- scripts/ci/check-testdata.sh | 18 ++++++++++++++++++ scripts/ci/update-cabal-versions.sh | 6 ++++++ 2 files changed, 24 insertions(+) create mode 100755 scripts/ci/check-testdata.sh create mode 100755 scripts/ci/update-cabal-versions.sh (limited to 'scripts') 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 -- cgit v1.2.3