Commit 099f9936 authored by Mark's avatar Mark

ci: another try

Before this patch, the file ci/ensure-jenv-is-present.bash just
contains the env build string from git clones.  What is wrong with our
dear Git?
parent 6fa0c089
#!/usr/bin/env bash
if [[ $(echo $PATH | grep -c .jenv) -eq 0 ]]; then
export PATH="$HOME/.jenv/bin:$PATH"
fi
......
......@@ -4,6 +4,9 @@ DIR="$(cd -P "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
. ${DIR}/install-jenv.bash
jdk=$1
if [[ -z $jdk ]]; then
jdk=openjdk8
fi
# empty variables are not necessary, but a hint that these are not
# lexically scoped in their modification.
......
function set_jdk() {
abcl_jdk=$1
if [[ -z ${abcl_jdk} ]]; then
abcl_jdk=openjdk8
fi
dir=$1
if [[ -z $dir ]]; then
dir=${TRAVIS_BUILD_DIR}
fi
. ${DIR}/ensure-jenv-is-present.bash
jenv versions
case ${ABCL_JDK} in
case ${abcl_jdk} in
openjdk8)
version=$(jenv versions | grep openjdk | grep 1.8 | tail -1 | sed s/*//)
;;
......@@ -15,7 +26,11 @@ function set_jdk() {
version=${jenv versions | tail -1 | sed s/*//)
fi
pushd ${TRAVIS_BUILD_DIR}
if [[ -z ${version} ]]; then
version=1.8
fi
pushd ${dir}
jenv local ${version}
# but practically we guard every invocation of jenv this way
......@@ -26,4 +41,4 @@ function set_jdk() {
popd
}
set_jdk
set_jdk ${ABCL_JDK} ${TRAVIS_BUILD_DIR}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment