Skip to content

Commit f9621ad

Browse files
committed
Update indentation levels and messaging
Fix indentation levels more helpful messages about supported versions
1 parent 567cf2c commit f9621ad

File tree

1 file changed

+22
-8
lines changed

1 file changed

+22
-8
lines changed

bin/steps/python

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,29 @@ if [[ $PYTHON_VERSION =~ ^python-2 ]]; then
1212
puts-warn "The latest version of Python 2 is $LATEST_2 (you are using $PYTHON_VERSION, which is unsupported)."
1313
puts-warn "We recommend upgrading by specifying the latest version ($LATEST_2)."
1414
echo " Learn More: https://devcenter.heroku.com/articles/python-runtimes"
15+
else
16+
echo " Using supported version of Python 2 ($PYTHON_VERSION)"
1517
fi
1618
else
17-
if [[ $PYTHON_VERSION =~ ^python-3.7 ]] && [[ "$PYTHON_VERSION" != "$LATEST_37" ]]; then
18-
puts-warn "The latest version of Python 3.7 is $LATEST_37 (you are using $PYTHON_VERSION, which is unsupported)."
19-
puts-warn "We recommend upgrading by specifying the latest version ($LATEST_37)."
20-
echo " Learn More: https://devcenter.heroku.com/articles/python-runtimes"
21-
else
22-
if [[ "$PYTHON_VERSION" != "$LATEST_36" ]]; then
23-
puts-warn "The latest version of Python 3.6 is $LATEST_36 (you are using $PYTHON_VERSION, which is unsupported)."
24-
puts-warn "We recommend upgrading by specifying the latest version ($LATEST_36)."
19+
if [[ $PYTHON_VERSION =~ ^python-3 ]]; then
20+
if [[ $PYTHON_VERSION =~ ^python-3.7 ]]; then
21+
if [[ "$PYTHON_VERSION" != "$LATEST_37" ]]; then
22+
puts-warn "The latest version of Python 3.7 is $LATEST_37 (you are using $PYTHON_VERSION, which is unsupported)."
23+
puts-warn "We recommend upgrading by specifying the latest version ($LATEST_37)."
2524
echo " Learn More: https://devcenter.heroku.com/articles/python-runtimes"
25+
else
26+
echo " Using supported version of Python 3.7 ($PYTHON_VERSION)"
27+
fi
28+
else
29+
if [[ $PYTHON_VERSION =~ ^python-3.6 ]]; then
30+
if [[ "$PYTHON_VERSION" != "$LATEST_36" ]]; then
31+
puts-warn "The latest version of Python 3.6 is $LATEST_36 (you are using $PYTHON_VERSION, which is unsupported)."
32+
puts-warn "We recommend upgrading by specifying the latest version ($LATEST_36)."
33+
echo " Learn More: https://devcenter.heroku.com/articles/python-runtimes"
34+
else
35+
echo " Using supported version of Python 3.6 ($PYTHON_VERSION)"
36+
fi
37+
fi
2638
fi
2739
fi
2840
fi
@@ -49,6 +61,7 @@ if [ -f .heroku/python-version ]; then
4961
fi
5062
fi
5163

64+
5265
if [ ! "$SKIP_INSTALL" ]; then
5366
puts-step "Installing $PYTHON_VERSION"
5467

@@ -71,6 +84,7 @@ if [ ! "$SKIP_INSTALL" ]; then
7184
hash -r
7285
fi
7386

87+
7488
# If Pip isn't up to date:
7589
if [ "$FRESH_PYTHON" ] || [[ ! $(pip --version) == *$PIP_UPDATE* ]]; then
7690

0 commit comments

Comments
 (0)