forked from heroku/heroku-buildpack-php
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdetect
executable file
·29 lines (22 loc) · 984 Bytes
/
detect
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env bash
# convenience functions
source "$(cd $(dirname $0); cd ..; pwd)"/bin/util/common.sh
if [[ -f "$1/composer.json" || -f "$1/index.php" ]]; then
echo "PHP" && exit 0
else
error <<-EOF
Application not supported by this buildpack!
The 'heroku/php' buildpack is set on this application, but was
unable to detect a PHP codebase.
A PHP app on Heroku requires a 'composer.json' at the root of
the directory structure, or an 'index.php' for legacy behavior.
If you are trying to deploy a PHP application, ensure that one
of these files is present at the top level directory.
If you are trying to deploy an application written in another
language, you need to change the list of buildpacks set on your
Heroku app using the 'heroku buildpacks' command.
For more information, refer to the following documentation:
https://devcenter.heroku.com/articles/buildpacks
https://devcenter.heroku.com/articles/php-support#activation
EOF
fi