From b9d80dd04f71031b92991a82e3065b04ad37c3c8 Mon Sep 17 00:00:00 2001 From: Orion Kindel Date: Thu, 20 Jul 2023 11:03:19 -0500 Subject: [PATCH] fix: gen_migrations committing, logging, gitmodule --- .gitea/workflows/gen-migrations.yml | 4 ++-- .gitmodules | 4 +--- scripts/build.sh | 4 ++-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/gen-migrations.yml b/.gitea/workflows/gen-migrations.yml index e35f765..24bf343 100644 --- a/.gitea/workflows/gen-migrations.yml +++ b/.gitea/workflows/gen-migrations.yml @@ -21,7 +21,7 @@ jobs: run: | set -ex git submodule update --init --remote migrations; - if ! (git diff-index --quiet --cached HEAD --); then + if ! (git diff-index --quiet HEAD --ignore-submodules=none); then git add -A git commit -m 'chore: update migrations' git push @@ -30,7 +30,7 @@ jobs: run: | ./scripts/gen_migrations.sh cd migrations - if ! (git diff-index --quiet --cached HEAD --); then + if ! (git diff-index --quiet HEAD --ignore-submodules=none); then git add -A git commit -m 'chore: babe wake up new migrations just dropped' git push diff --git a/.gitmodules b/.gitmodules index 2a92371..ece3eb5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,4 @@ [submodule "migrations"] + branch = migrations path = migrations url = git@git.orionkindel.com:dnim/db - branch = migrations -[submodule "migraionts"] - branch = migrations diff --git a/scripts/build.sh b/scripts/build.sh index 7262028..ca35b61 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -41,5 +41,5 @@ cp .env.schema "./$base_or_head/.env.schema" cd "./$base_or_head" docker compose up --wait --wait-timeout 30 -d "$base_or_head" -initdb || (docker compose logs "$base_or_head" && exit 1) -ls ./schema/ | xargs -I{} bash -c "set -e; $(declare -f query_file); query_file \"$(db dnim)\" ./schema/{}" || (docker compose logs "$base_or_head" && exit 1) +initdb +ls ./schema/ | xargs -I{} bash -c "set -e; $(declare -f query_file); query_file \"$(db dnim)\" ./schema/{}"