File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change 2
2
3
3
# Convenience script for checking constraints locally
4
4
5
- set -euxo pipefail
5
+ set -euo pipefail +x
6
6
7
7
cd ` dirname $0 `
8
8
9
9
MAJOR=${1:- 23}
10
- LTS=$( curl -s https://www.stackage.org/download/snapshots.json | jq -r ' .["lts-' $MAJOR ' "]' )
10
+ LTS=$( curl -f - s https://www.stackage.org/download/snapshots.json | jq -r ' .["lts-' $MAJOR ' "]' )
11
11
12
- echo " $LTS "
12
+ # 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
+ if [ -z " $LTS " ]; then
18
+ echo " failed to read lts minor version 2 times"
19
+ exit 1
20
+ else
21
+ echo " $LTS "
22
+ fi
13
23
14
24
export GHCVER=$( sed -n " s/^ghc-version: \" \(.*\)\" /\1/p" " lts-$MAJOR -build-constraints.yaml" )
15
25
You can’t perform that action at this time.
0 commit comments