diff options
Diffstat (limited to 'packaging/build/build-hub.sh')
| -rwxr-xr-x | packaging/build/build-hub.sh | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/packaging/build/build-hub.sh b/packaging/build/build-hub.sh index be2d363..e32ba55 100755 --- a/packaging/build/build-hub.sh +++ b/packaging/build/build-hub.sh @@ -47,11 +47,15 @@ ln -sf /opt/meshbay-common/venv/bin/meshbay-hub "$ROOT/usr/bin/meshbay-hub" # --- Hub-specific assets -------------------------------------------------- mkdir -p "$ROOT/opt/meshbay-hub" -# Alembic config (migrations are inside the installed package at meshbay_hub/db/migrations/) -if [ -f "$REPO/packages/meshbay-hub/alembic.ini" ]; then - mkdir -p "$ROOT/opt/meshbay-hub/migrations" - cp "$REPO/packages/meshbay-hub/alembic.ini" "$ROOT/opt/meshbay-hub/migrations/" -fi +# No alembic.ini is staged. It resolves `script_location` with `%(here)s`, so a +# copy of it is only correct where it was copied from: staged into +# /opt/meshbay-hub/migrations/ it pointed at +# /opt/meshbay-hub/migrations/src/meshbay_hub/db/migrations, which nothing +# installs — the migrations live inside the package, in the shared venv. The +# unit runs `meshbay-hub migrate` instead, which asks the package. +# +# The same `%(here)s` trap had already been found once on the server, where a +# stray alembic.ini resolved to a month-old snapshot of the tree. # Config example. # |