From 994fa9d093f67b497d9ed3e3fb22d8ba2b059574 Mon Sep 17 00:00:00 2001 From: Orion Kindel Date: Wed, 19 Jul 2023 22:30:23 -0500 Subject: [PATCH] fix: gen-migrations workflow --- scripts/build.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/build.sh b/scripts/build.sh index 4d6656a..25b6ff6 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -14,12 +14,13 @@ else port=5432 fi -docker compose rm -vsf "$base_or_head" - db() { echo -n "postgresql:///$1?port=$port&user=$POSTGRES_USER&password=$POSTGRES_PASSWORD" } +docker compose rm -vsf "$base_or_head" +until ! psql $(db postgres) -c "select 1" &>/dev/null; do true; done; + isready() { until psql $(db postgres) -c "select 1" &>/dev/null; do true; done; }