Commit fcdf60a0 authored by Mark Evenson's avatar Mark Evenson
Browse files

ci: try even harder to ensure jenv shim is used for build

parent a9f61673
......@@ -33,7 +33,7 @@ install:
- echo $(pwd)
- bash -x ${TRAVIS_BUILD_DIR}/ci/install-adoptjdk.bash ${ABCL_JDK}
# Build ABCL
- ant abcl
- . ${TRAVIS_BUILD_DIR}/ci/ensure-jenv-is-present.bash && ant abcl
# Configure finding abcl build source via ASDF
- bash -x ${TRAVIS_BUILD_DIR}/ci/asdf-finds-abcl.bash
# Install Quicklisp
......
#!/bin/bash
#!/usr/bin/env bash
if [[ $(echo $PATH | grep -c .jenv) -eq 0 ]]; then
export PATH="$HOME/.jenv/bin:$PATH"
fi
eval "$(jenv init -)"
#!/usr/bin/env bash
DIR="$(cd -P "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source ${DIR}/install-jenv.bash
. ${DIR}/install-jenv.bash
jdk=$1
......@@ -63,32 +63,16 @@ function add_jdk() {
esac
}
function set_jdk() {
. ${DIR}/ensure-jenv-is-present.bash
jenv versions
case ${ABCL_JDK} in
openjdk8)
version=$(jenv versions | grep openjdk | grep 1.8 | tail -1 | sed s/*//)
;;
openjdk11)
version=$(jenv versions | grep openjdk | grep 11.0 | tail -1 | sed s/*//)
;;
esac
pushd ${TRAVIS_BUILD_DIR}
jenv local ${version}
# but practically we guard every invocation of jenv this way
jenv global ${version}
popd
}
# grab the set_jdk routine
. set-jdk.bash
determine_adoptjdk
download_and_extract
add_jdk
set_jdk
jenv
. ${DIR}/set_jdk.bash
......
......@@ -7,12 +7,6 @@ if [[ ! -r "${target}" ]]; then
git clone https://github.com/jenv/jenv.git "${target}"
fi
# FIXME: don't always run the init routines?
profile=~/.bash_profile
echo 'export PATH="$HOME/.jenv/bin:$PATH"' >> ${profile}
echo 'eval "$(jenv init -)"' >> ${profile}
. ${profile}
. ${DIR}/ensure-jenv-is-present.bash
jenv enable-plugin ant
......
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