mirror of
https://github.com/khibino/haskell-relational-record.git
synced 2024-11-25 08:19:14 +03:00
56c15e0c94
(grafted from fc91159db3562510aee32cc677004f63ffe661f5)
96 lines
2.1 KiB
Bash
96 lines
2.1 KiB
Bash
## -*- sh -*-
|
|
|
|
custom_retry() {
|
|
i=0
|
|
until "$@" ; do
|
|
if [ $i -ge 3 ]; then
|
|
break;
|
|
fi
|
|
sleep 1
|
|
i=$(expr $i + 1)
|
|
done
|
|
}
|
|
|
|
cabal_common() {
|
|
cat <<EOF
|
|
remote-repo: hackage.haskell.org:http://hackage.haskell.org/packages/archive
|
|
remote-repo-cache: ${HOME}/.cabal/packages
|
|
world-file: ${HOME}/.cabal/world
|
|
build-summary: ${HOME}/.cabal/logs/build.log
|
|
remote-build-reporting: anonymous
|
|
EOF
|
|
}
|
|
|
|
skip_no_match_branch () {
|
|
set +x
|
|
cat <<EOF
|
|
STACK_RESOLVER: $STACK_RESOLVER
|
|
TRAVIS_BRANCH: $TRAVIS_BRANCH
|
|
EOF
|
|
case x"$STACK_RESOLVER" in
|
|
xlts-10.*|xlts-11.*)
|
|
case x"$TRAVIS_BRANCH" in
|
|
xmaster)
|
|
cat <<EOF
|
|
STACK_RESOLVER is LTS-{10,11} and TRAVIS_BRANCH is master.
|
|
EOF
|
|
;;
|
|
*)
|
|
cat <<EOF
|
|
Skipping. STACK_RESOLVER is LTS-10 and TRAVIS_BRANCH is NOT master.
|
|
EOF
|
|
set -x
|
|
exit 0
|
|
;;
|
|
esac
|
|
;;
|
|
xlts-9.*)
|
|
case x"$TRAVIS_BRANCH" in
|
|
xrelational-query-0.9.x|xlts-9)
|
|
cat <<EOF
|
|
STACK_RESOLVER is LTS-9 and TRAVIS_BRANCH is LTS-9 or relational-query-0.9.x.
|
|
EOF
|
|
;;
|
|
*)
|
|
cat <<EOF
|
|
Skipping. STACK_RESOLVER is LTS-9 and TRAVIS_BRANCH is NOT LTS-9 or NOT relational-query-0.9.x.
|
|
EOF
|
|
set -x
|
|
exit 0
|
|
;;
|
|
esac
|
|
;;
|
|
xlts-[678].*)
|
|
case x"$TRAVIS_BRANCH" in
|
|
xlts-8)
|
|
cat <<EOF
|
|
STACK_RESOLVER is LTS-[876] and TRAVIS_BRANCH is LTS-8.
|
|
EOF
|
|
;;
|
|
*)
|
|
cat <<EOF
|
|
Skipping. STACK_RESOLVER is LTS-[876] and TRAVIS_BRANCH is NOT LTS-8.
|
|
EOF
|
|
set -x
|
|
exit 0
|
|
;;
|
|
esac
|
|
;;
|
|
*)
|
|
cat <<EOF
|
|
Skipping. unknown STACK_RESOLVER
|
|
EOF
|
|
exit 0
|
|
;;
|
|
esac
|
|
set -x
|
|
}
|
|
|
|
show_stack_pkgs() {
|
|
echo packages:
|
|
for d in $dirs ; do
|
|
echo " - ${d}/"
|
|
done
|
|
echo ''
|
|
}
|