diff options
| author | mo khan <mo.khan@gmail.com> | 2020-01-09 11:26:40 +0000 |
|---|---|---|
| committer | Can Eldem <celdem@gitlab.com> | 2020-01-09 11:26:40 +0000 |
| commit | d89872f850332736eb174f2b0ab28692fda6bf46 (patch) | |
| tree | 3944b2eade680f90739f2f3805dfec1a7bb1a360 /run.sh | |
| parent | d51e4d90b3e7dbfc5b0a9ec90f37baf84dc105d0 (diff) | |
Upgrade python from 3.5 to 3.8
Diffstat (limited to 'run.sh')
| -rwxr-xr-x | run.sh | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -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 |
