blob: 69e5ef35d3d552588b667a17986c0b52cddd2e7c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
verlte() {
[ "$1" = "$(printf '%s\n%s\n' "$1" "$2" | sort -V | head -n1)" ]
}
mkdir -p "$build_dir/bin"
if command -v stack; then
stack_ver=$(stack --numeric-version)
else
stack_ver=0
fi
ghc_ver=$(ghc --numeric-version)
# we need at least 1.9.4 for `stack ide packages --cabal-files --stdout`
if verlte "$stack_ver" 1.9.3 &&
verlte 8.2.2 "$ghc_ver"
then
"$CI_SCRIPTS_DIR"/install-stack.sh "$build_dir/bin"
PATH="$build_dir/bin:$PATH"
export PATH
fi
|