From 4e2c8ccc39f9f9c2906d8eac85a1ec7c95e785fa Mon Sep 17 00:00:00 2001 From: Troy McConaghy Date: Mon, 11 Mar 2019 14:14:43 +0100 Subject: [PATCH 1/3] Try to enforce py3 & pip3 in Travis deploy --- .travis.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5bab302e..c30fa821 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,20 +7,20 @@ dist: xenial # Deploying uses awscli and it uses Python. # Xenial on Travis comes with Python 2 & 3 installed but 2 is default. -# Ensure pip3 is installed -# and make python3 and pip3 the defaults: +# Ensure pip3 is installed and upgraded. before_install: - sudo apt-get -qq update - sudo apt-get install python3-pip - - alias python=python3 - - alias pip=pip3 + - sudo -H pip3 install --upgrade pip script: - npm test - 'if [ "$TRAVIS_SECURE_ENV_VARS" = "true" ]; then npm run build; fi' +# Try to ensure Python 3 and pip3 get used for deployment: after_success: - - pip install --user awscli + - alias python=python3 + - pip3 install --user awscli - export PATH=$PATH:$HOME/.local/bin - npm run deploy From b78d5f3142d700028e80d6b68851d326137f34f5 Mon Sep 17 00:00:00 2001 From: Troy McConaghy Date: Mon, 11 Mar 2019 14:28:49 +0100 Subject: [PATCH 2/3] .travis.yml ignores alias; use something else --- .travis.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index c30fa821..45cef0b5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,9 +17,10 @@ script: - npm test - 'if [ "$TRAVIS_SECURE_ENV_VARS" = "true" ]; then npm run build; fi' -# Try to ensure Python 3 and pip3 get used for deployment: +# Try to ensure Python 3 and pip3 get used for deployment. +# Note that "alias" commands do not work in .travis.yml after_success: - - alias python=python3 + - pyenv global 3.6 - pip3 install --user awscli - export PATH=$PATH:$HOME/.local/bin - npm run deploy From cef25685986a2e8adcf1f710790e06a18dbf8394 Mon Sep 17 00:00:00 2001 From: Troy McConaghy Date: Mon, 11 Mar 2019 14:50:08 +0100 Subject: [PATCH 3/3] Don't worry about Python version for Travis deploy --- .travis.yml | 3 --- scripts/deploy.sh | 3 --- 2 files changed, 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 45cef0b5..cde1c659 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,10 +17,7 @@ script: - npm test - 'if [ "$TRAVIS_SECURE_ENV_VARS" = "true" ]; then npm run build; fi' -# Try to ensure Python 3 and pip3 get used for deployment. -# Note that "alias" commands do not work in .travis.yml after_success: - - pyenv global 3.6 - pip3 install --user awscli - export PATH=$PATH:$HOME/.local/bin - npm run deploy diff --git a/scripts/deploy.sh b/scripts/deploy.sh index 1c706957..54cdd674 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -11,9 +11,6 @@ SITEMAP_URL="https%3A%2F%2Fdocs.oceanprotocol.com%2Fsitemap.xml" # set -e; -echo "Default python (used by awscli):" -python --version - function s3sync { aws s3 sync ./public s3://"$1" \ --cache-control public,max-age=31536000,immutable \