summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorTimothy Crosley <timothy.crosley@gmail.com>2019-03-03 12:45:42 -0800
committerTimothy Crosley <timothy.crosley@gmail.com>2019-03-03 12:45:42 -0800
commit6dfabb9901280e3aff2cb51d4c06acba575f2832 (patch)
tree651d005e1de3426502114a12da3bdbccf5831ea2 /scripts
parentde7de485f24fe1a217b4e9e93b0fd2062a207d74 (diff)
downloadisort-6dfabb9901280e3aff2cb51d4c06acba575f2832.tar.gz
Pull request to merge in latest hotfix master changes into develop branch
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/before_install.sh28
1 files changed, 28 insertions, 0 deletions
diff --git a/scripts/before_install.sh b/scripts/before_install.sh
new file mode 100755
index 00000000..fa86a770
--- /dev/null
+++ b/scripts/before_install.sh
@@ -0,0 +1,28 @@
+#! /bin/bash
+
+echo $TRAVIS_OS_NAME
+
+ if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
+
+ # Travis has an old version of pyenv by default, upgrade it
+ brew update > /dev/null 2>&1
+ brew outdated pyenv || brew upgrade pyenv
+
+ pyenv --version
+
+ # Find the latest requested version of python
+ case "$TOXENV" in
+ py34)
+ python_minor=4;;
+ py35)
+ python_minor=5;;
+ py36)
+ python_minor=6;;
+ py37)
+ python_minor=7;;
+ esac
+ latest_version=`pyenv install --list | grep -e "^[ ]*3\.$python_minor" | tail -1`
+
+ pyenv install $latest_version
+ pyenv local $latest_version
+fi