warn when using an older version of python

Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
This commit is contained in:
2017-09-26 09:34:58 -04:00
parent fc4f686f1e
commit 6010d1f3ed
2 changed files with 17 additions and 1 deletions
+13
View File
@@ -4,6 +4,19 @@ set +e
runtime-fixer runtime.txt
PYTHON_VERSION=$(cat runtime.txt)
if [[ $PYTHON_VERSION == "python-2*" ]]; then
if [[ "$PYTHON_VERSION" != "$LATEST_2" ]]; then
puts-warn "The latest version of Python 2 is $LATEST_2. We recommend upgrading by specifying this version in a runtime.txt file."
puts " Learn More: https://devcenter.heroku.com/articles/python-runtimes"
fi
else
if [[ "$PYTHON_VERSION" != "$LATEST_3" ]]; then
puts-warn "The latest version of Python 3 is $LATEST_2. We recommend upgrading by specifying this version in a runtime.txt file."
puts " Learn More: https://devcenter.heroku.com/articles/python-runtimes"
fi
fi
if [[ "$STACK" != "$CACHED_PYTHON_STACK" ]]; then
puts-step "Stack has changed from $CACHED_PYTHON_STACK to $STACK, clearing cache"
rm -fr .heroku/python-stack .heroku/python-version .heroku/python .heroku/vendor