rename(phase 1): CapaKraken → Nexus across code, UI, docs, CI #61
+3
-3
@@ -5,15 +5,15 @@ cd "$(dirname "$0")/.."
|
||||
echo "Stopping CapaKraken..."
|
||||
|
||||
# 1. Stop any legacy local dev server
|
||||
if [ -f /tmp/capakraken-dev.pid ]; then
|
||||
PID=$(cat /tmp/capakraken-dev.pid)
|
||||
if [ -f /tmp/nexus-dev.pid ]; then
|
||||
PID=$(cat /tmp/nexus-dev.pid)
|
||||
if kill -0 "$PID" 2>/dev/null; then
|
||||
echo " Stopping Next.js (PID $PID)..."
|
||||
kill "$PID" 2>/dev/null || true
|
||||
sleep 1
|
||||
kill -9 "$PID" 2>/dev/null || true
|
||||
fi
|
||||
rm -f /tmp/capakraken-dev.pid
|
||||
rm -f /tmp/nexus-dev.pid
|
||||
fi
|
||||
|
||||
# Also kill anything on port 3100 (cross-platform: lsof works on Linux + macOS)
|
||||
|
||||
@@ -19,14 +19,14 @@ echo "Postgres is ready."
|
||||
CI=true pnpm install --frozen-lockfile
|
||||
|
||||
# Regenerate Prisma client (needed after bind-mount overlays the image layer)
|
||||
pnpm --filter @capakraken/db db:generate
|
||||
pnpm --filter @nexus/db db:generate
|
||||
|
||||
# Sync full schema to the DB first. The files under prisma/migrations/ are
|
||||
# idempotent SUPPLEMENTS (see "IF NOT EXISTS" guards in each migration.sql);
|
||||
# they assume the base tables already exist from a prior `db push`. On a
|
||||
# fresh DB, migrate deploy alone would fail because the first incremental
|
||||
# migration references "users" before it exists.
|
||||
pnpm --filter @capakraken/db exec prisma db push --schema ./prisma/schema.prisma --accept-data-loss --skip-generate
|
||||
pnpm --filter @nexus/db exec prisma db push --schema ./prisma/schema.prisma --accept-data-loss --skip-generate
|
||||
|
||||
# After db push the schema matches schema.prisma exactly, but the
|
||||
# _prisma_migrations table is empty, which makes `migrate deploy` fail
|
||||
@@ -35,17 +35,17 @@ pnpm --filter @capakraken/db exec prisma db push --schema ./prisma/schema.prisma
|
||||
# supplements (IF NOT EXISTS guards), so marking-as-applied is safe.
|
||||
for m in packages/db/prisma/migrations/*/; do
|
||||
name=$(basename "$m")
|
||||
pnpm --filter @capakraken/db exec prisma migrate resolve \
|
||||
pnpm --filter @nexus/db exec prisma migrate resolve \
|
||||
--applied "$name" --schema ./prisma/schema.prisma || true
|
||||
done
|
||||
|
||||
# Run pending migrations so a fresh checkout picks up incremental additions
|
||||
pnpm --filter @capakraken/db db:migrate:deploy
|
||||
pnpm --filter @nexus/db db:migrate:deploy
|
||||
|
||||
pnpm check:exports
|
||||
pnpm check:imports
|
||||
|
||||
repo_home="/tmp/capakraken-dev-home"
|
||||
repo_home="/tmp/nexus-dev-home"
|
||||
|
||||
# Cross-platform stat: GNU stat uses -c, BSD/macOS stat uses -f
|
||||
if stat -c '%u' /app >/dev/null 2>&1; then
|
||||
@@ -65,8 +65,8 @@ chown -R "$repo_uid:$repo_gid" "$repo_home"
|
||||
if command -v setpriv >/dev/null 2>&1; then
|
||||
exec setpriv --reuid="$repo_uid" --regid="$repo_gid" --clear-groups \
|
||||
env HOME="$repo_home" XDG_CONFIG_HOME="$repo_home/.config" \
|
||||
pnpm --filter @capakraken/web exec next dev -H 0.0.0.0 -p 3100
|
||||
pnpm --filter @nexus/web exec next dev -H 0.0.0.0 -p 3100
|
||||
else
|
||||
exec su -s /bin/sh "#${repo_uid}" -c \
|
||||
"HOME='$repo_home' XDG_CONFIG_HOME='$repo_home/.config' pnpm --filter @capakraken/web exec next dev -H 0.0.0.0 -p 3100"
|
||||
"HOME='$repo_home' XDG_CONFIG_HOME='$repo_home/.config' pnpm --filter @nexus/web exec next dev -H 0.0.0.0 -p 3100"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user