From 5b511cb630e7b4121dc758d5fedc3cd50cd7fadc Mon Sep 17 00:00:00 2001 From: mo khan Date: Fri, 21 Feb 2020 15:25:24 -0700 Subject: Upgrade to version 6.0.0 of the Docker image * Remove custom Java installation * Install java and conan for backwards compatibiilty * Make legacy java the default * Control java version via asdf * Add support for legacy version files * Update version and CHANGELOG * Load appropriate python version --- run.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'run.sh') diff --git a/run.sh b/run.sh index 8c7389b..05e336f 100755 --- a/run.sh +++ b/run.sh @@ -78,13 +78,14 @@ case "$LM_PYTHON_VERSION" in "3") echo "switching to python $LM_PYTHON_VERSION" LICENSE_FINDER_CLI_OPTS="--python-version 3 $LICENSE_FINDER_CLI_OPTS" + asdf shell python "$(asdf list python | awk '{ print $1 }' | grep '^3' | sort -rn | head -n1)" pip --version ;; "3.5") echo "switching to python $LM_PYTHON_VERSION" LICENSE_FINDER_CLI_OPTS="--python-version 3 $LICENSE_FINDER_CLI_OPTS" - asdf shell python 3.5.9 + asdf shell python "$(asdf list python | awk '{ print $1 }' | grep '^3.5')" pip --version ;; @@ -109,7 +110,10 @@ case "$COMMAND" in shift pushd $APP_PATH > /dev/null + asdf list + asdf current if [[ -z "${SETUP_CMD}" ]]; then + asdf install # Before running license_finder, we need to install dependencies for the project. if test -f Gemfile ; then if test -n "$rvm_recommended_ruby" ; then @@ -163,10 +167,11 @@ case "$COMMAND" in fi if [[ ${LM_JAVA_VERSION} = "11" ]]; then - JAVA_HOME=/usr/lib/jvm/adoptopen_jdk11 + asdf shell java "$(asdf list java | awk '{ print $1 }' | grep '^adopt-openjdk-11')" elif [[ ${LM_JAVA_VERSION} = "8" ]]; then - JAVA_HOME=/usr/lib/jvm/oracle_jdk8 + asdf shell java "$(asdf list java | awk '{ print $1 }' | grep '^adopt-openjdk-8')" fi + export JAVA_HOME=$(asdf where java) if test -f pom.xml ; then # Install Java Maven dependencies. -- cgit v1.2.3