diff options
| author | mo khan <mo.khan@gmail.com> | 2020-02-21 15:25:24 -0700 |
|---|---|---|
| committer | mo khan <mo.khan@gmail.com> | 2020-02-26 08:53:17 -0700 |
| commit | 5b511cb630e7b4121dc758d5fedc3cd50cd7fadc (patch) | |
| tree | f80255ab4eb11b64c2ded1cdf4b3eb7c31c468cb /run.sh | |
| parent | 39afdc40296871d9f7c1732ff3f7e1e3b7b28bbe (diff) | |
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
Diffstat (limited to 'run.sh')
| -rwxr-xr-x | run.sh | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -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. |
