diff options
| author | mo khan <mo.khan@gmail.com> | 2020-02-26 18:34:22 +0000 |
|---|---|---|
| committer | mo khan <mo.khan@gmail.com> | 2020-02-26 18:34:22 +0000 |
| commit | c459a6d76a0f540ac4c5345d6f6124769aa55184 (patch) | |
| tree | 425505aa058ec6aae9e7f79c0219331c4d64e26d /run.sh | |
| parent | 39afdc40296871d9f7c1732ff3f7e1e3b7b28bbe (diff) | |
| parent | d1ad4a02f760f654686ceb82933a9b99bf978a82 (diff) | |
Merge branch '199078-docker-lf-6' into 'master'v2.6.0
Upgrade to version 6.0.0 of the Docker image
See merge request gitlab-org/security-products/license-management!115
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. |
