Newer
Older
if [[ ! -f $BUILD_DIR/runtime.txt ]]; then
puts-warn "No 'Pipfile.lock' found! We recommend you commit this into your repository."
PYTHON=$(jq -r '._meta.requires.python_full_version' "$BUILD_DIR/Pipfile.lock")
if [[ "$PYTHON" != "null" ]]; then
echo "python-$PYTHON" > "$BUILD_DIR/runtime.txt"
fi
if [[ "$PYTHON" == "null" ]]; then
PYTHON=$(jq -r '._meta.requires.python_version' "$BUILD_DIR/Pipfile.lock")
if [ "$PYTHON" = 2.7 ]; then
echo "$LATEST_27" > "$BUILD_DIR/runtime.txt"
echo "$LATEST_36" > "$BUILD_DIR/runtime.txt"
fi
if [ "$PYTHON" = 3.7 ]; then
echo "$LATEST_37" > "$BUILD_DIR/runtime.txt"