From a31257a9699455a6f849b82b50d291a70956b88c Mon Sep 17 00:00:00 2001 From: github-actions Date: Mon, 28 Oct 2024 18:45:37 +0000 Subject: [PATCH] update with project-syncing action --- bin/server | 4 ++++ bin/setup | 3 +++ 2 files changed, 7 insertions(+) diff --git a/bin/server b/bin/server index 6668021..8febf16 100755 --- a/bin/server +++ b/bin/server @@ -1,5 +1,9 @@ #!/bin/bash +if pg_ctl status | grep -q 'no server running'; then + pg_start; +fi + DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" parentdir="$(dirname "$DIR")" pid="$parentdir/tmp/pids/server.pid" diff --git a/bin/setup b/bin/setup index cc31d75..c1231ce 100755 --- a/bin/setup +++ b/bin/setup @@ -28,6 +28,9 @@ FileUtils.chdir APP_ROOT do # FileUtils.cp "config/database.yml.sample", "config/database.yml" # end + puts "\n== Starting postgres ==" + system! "if pg_ctl status | grep -q 'no server running'; then pg_start; fi" + puts "\n== Preparing database ==" system! "bin/rails db:prepare"