File tree Expand file tree Collapse file tree 1 file changed +18
-9
lines changed Expand file tree Collapse file tree 1 file changed +18
-9
lines changed Original file line number Diff line number Diff line change @@ -8,16 +8,25 @@ echo "---"
88
99dependencies_file_path=" ${BUILD_DIR} /.heroku/sbt-dependency-classpath.log"
1010
11- if [[ -f " ${dependencies_file_path} " ]] && (
12- grep -q " com/impossibl/pgjdbc-ng" " ${dependencies_file_path} " ||
13- grep -q " org/postgresql" " ${dependencies_file_path} " ||
14- grep -q " skunk-core" " ${dependencies_file_path} " ||
15- grep -q " postgresql-async" " ${dependencies_file_path} " ||
16- grep -q " quill-ndbc-postgres" " ${dependencies_file_path} "
17- ); then
11+ # Auto-provision Heroku Postgres if PostgreSQL dependencies are detected.
12+ # Only applicable to accounts created before May 15, 2023 or accounts with auto-provisioning enabled.
13+ # See: https://devcenter.heroku.com/articles/scala-support#postgres-auto-provisioning
14+ if [[ -f " ${dependencies_file_path} " ]]; then
15+ postgresql_dependencies=(
16+ " com/impossibl/pgjdbc-ng" # https://impossibl.github.io/pgjdbc-ng/
17+ " org/postgresql" # https://jdbc.postgresql.org/
18+ " skunk-core" # https://typelevel.org/skunk/
19+ " postgresql-async" # https://github.com/postgresql-async/postgresql-async
20+ " quill-ndbc-postgres" # https://github.com/zio/zio-quill
21+ )
1822
19- echo " addons:"
20- echo " - heroku-postgresql"
23+ for dependency in " ${postgresql_dependencies[@]} " ; do
24+ if grep -q " ${dependency} " " ${dependencies_file_path} " ; then
25+ echo " addons:"
26+ echo " - heroku-postgresql"
27+ break
28+ fi
29+ done
2130fi
2231
2332if [[ ! -f " ${BUILD_DIR} /Procfile" ]]; then
You can’t perform that action at this time.
0 commit comments