mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-06-25 16:19:19 +02:00
feat(deploy): add deploy-verify-permissions recipe + upload/run deploy-server.sh before verification + run migrations in deploy
This commit is contained in:
@@ -7,9 +7,18 @@
|
||||
set -euo pipefail
|
||||
|
||||
REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
APP_DIR="$REPO_ROOT/app"
|
||||
SCHEMA="$APP_DIR/storage/schema.sql"
|
||||
PROD_DB="$APP_DIR/storage/xamxam.db"
|
||||
|
||||
# Detect layout: local dev has app/ subdir, server has files at repo root
|
||||
if [ -d "$REPO_ROOT/app/storage" ]; then
|
||||
SCHEMA="$REPO_ROOT/app/storage/schema.sql"
|
||||
PROD_DB="$REPO_ROOT/app/storage/xamxam.db"
|
||||
elif [ -f "$REPO_ROOT/storage/schema.sql" ]; then
|
||||
SCHEMA="$REPO_ROOT/storage/schema.sql"
|
||||
PROD_DB="$REPO_ROOT/storage/xamxam.db"
|
||||
else
|
||||
echo "ERROR: cannot find storage/schema.sql" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
init_db() {
|
||||
local db="$1"
|
||||
|
||||
Reference in New Issue
Block a user