mirror of
https://github.com/kennethreitz/heroku-buildpack-python.git
synced 2026-06-05 23:10:16 +00:00
15 lines
364 B
Bash
Executable File
15 lines
364 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# bin/detect <build-dir>
|
|
|
|
BUILD_DIR=$1
|
|
|
|
function abort() {
|
|
echo $1 1>&2
|
|
exit 1
|
|
}
|
|
|
|
[ -f $BUILD_DIR/requirements.txt ] || abort "fatal: Not a Python app (no requirements.txt)"
|
|
|
|
# 'Python/Django' if there is a [mysite]/settings.py file present; otherwise 'Python'
|
|
ls $BUILD_DIR/**/settings.py &> /dev/null && echo Python/Django || echo Python
|