We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 62d41ee commit 62151e5Copy full SHA for 62151e5
build-constraints/check-lts
@@ -2,14 +2,24 @@
2
3
# Convenience script for checking constraints locally
4
5
-set -euxo pipefail
+set -euo pipefail +x
6
7
cd `dirname $0`
8
9
MAJOR=${1:-23}
10
-LTS=$(curl -s https://www.stackage.org/download/snapshots.json | jq -r '.["lts-'$MAJOR'"]')
+LTS=$(curl -f -s https://www.stackage.org/download/snapshots.json | jq -r '.["lts-'$MAJOR'"]')
11
12
-echo "$LTS"
+# sometimes http fails
13
+if [ -z "$LTS" ]; then
14
+ LTS=$(curl -f -s https://www.stackage.org/download/snapshots.json | jq -r '.["lts-'$MAJOR'"]')
15
+fi
16
+
17
18
+ echo "failed to read lts minor version 2 times"
19
+ exit 1
20
+else
21
+ echo "$LTS"
22
23
24
export GHCVER=$(sed -n "s/^ghc-version: \"\(.*\)\"/\1/p" "lts-$MAJOR-build-constraints.yaml")
25
0 commit comments