improvements to pipenv python version detection

Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
This commit is contained in:
2017-09-26 09:49:41 -04:00
parent 2b7671369d
commit 29aeefeba1
+4 -1
View File
@@ -11,9 +11,12 @@ if [[ -f $BUILD_DIR/Pipfile ]]; then
if [[ -f $BUILD_DIR/Pipfile.lock ]]; then
set +e
PYTHON=$(jq -r '._meta.requires.python_full_version' "$BUILD_DIR/Pipfile.lock")
if [[ "$PYTHON" != "null" ]]; then
echo "$PYTHON" > "$BUILD_DIR/runtime.txt"
fi
set -e
if [[ ! "$PYTHON" ]]; then
if [[ "$PYTHON" != "null" ]]; then
PYTHON=$(jq -r '._meta.requires.python_version' "$BUILD_DIR/Pipfile.lock")
if [ "$PYTHON" = 2.7 ]; then
echo "python-2.7.14" > "$BUILD_DIR/runtime.txt"