summaryrefslogtreecommitdiff
path: root/run.sh
diff options
context:
space:
mode:
Diffstat (limited to 'run.sh')
-rwxr-xr-xrun.sh11
1 files changed, 8 insertions, 3 deletions
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.