Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bin/detect
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
BUILD_DIR=$1

# Exit early if app is clearly not Python.
if [ -f "$BUILD_DIR/requirements.txt" ] || [ -f "$BUILD_DIR/setup.py" ] || [ -f "$BUILD_DIR/Pipfile" ] || [ -f "$BUILD_DIR/Pipfile.lock"] || [ -f "$BUILD_DIR/pyproject.py"] || [ -f "$BUILD_DIR/poetry.lock"]; then
if [ -f "$BUILD_DIR/requirements.txt" ] || [ -f "$BUILD_DIR/setup.py" ] || [ -f "$BUILD_DIR/Pipfile" ] || [ -f "$BUILD_DIR/Pipfile.lock" ] || [ -f "$BUILD_DIR/pyproject.toml"] || [ -f "$BUILD_DIR/poetry.lock" ]; then
echo Python Project Detected...
else
exit 1
fi
fi
2 changes: 1 addition & 1 deletion bin/steps/poetry-python-version
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if [[ -f $BUILD_DIR/pyproject.toml || -f $BUILD_DIR/poetry.lock ]]; then
fi
else
PYTHON=$(sed -nr "/^\[metadata\]/ { :l /^python-versions[ ]*=/ { s/.*=[ ]*//; p; q;}; n; b l;}" "$BUILD_DIR/poetry.lock" | tr -d '"^')
if ! [ -z $PYTHON]; then
if ! [ -z $PYTHON ]; then
if [[ "$PYTHON" == +([0-9]).+([0-9]).+([0-9]) ]]; then
echo "python-$PYTHON" > "$BUILD_DIR/runtime.txt"
elif [ $PYTHON = 2.7 ]; then
Expand Down