summaryrefslogtreecommitdiff
path: root/run.sh
diff options
context:
space:
mode:
Diffstat (limited to 'run.sh')
-rwxr-xr-xrun.sh16
1 files changed, 12 insertions, 4 deletions
diff --git a/run.sh b/run.sh
index 6d29f6f..06cafd7 100755
--- a/run.sh
+++ b/run.sh
@@ -54,7 +54,6 @@ if [ "$COMMAND" = "/test/test.sh" ] ; then
fi
# Check number of arguments
-
if [ "$COMMAND" = "analyze" -a $# -ne 1 ] ; then
echo "$usage"
exit 1
@@ -65,17 +64,27 @@ if [ "$COMMAND" = "test" -a $# -ne 3 ] ; then
exit 1
fi
+source $HOME/.asdf/asdf.sh
+
# Switch to Python 3 if requesting
case "$LM_PYTHON_VERSION" in
"2"|"2.7")
echo "using python $LM_PYTHON_VERSION"
LICENSE_FINDER_CLI_OPTS="--python-version 2 $LICENSE_FINDER_CLI_OPTS"
- pip2 --version
+ asdf shell python "$(asdf list python | awk '{ print $1 }' | grep '^2')"
+ pip --version
+ ;;
+
+ "3")
+ echo "switching to python $LM_PYTHON_VERSION"
+ LICENSE_FINDER_CLI_OPTS="--python-version 3 $LICENSE_FINDER_CLI_OPTS"
+ pip --version
;;
- "3"|"3.5")
+ "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
pip --version
;;
@@ -114,7 +123,6 @@ case "$COMMAND" in
# rvm pulls outdated gems
# need this to update system bundler
# We need to install the license_finder gem into this Ruby version too.
- gem install license_finder -v "$LICENSE_FINDER_VERSION"
gem install --no-document /opt/license-management/*.gem
fi