chore(release): ship scripts/lib/ + classify upgrade-stash-cleanup.sh

Two release-build fixes paired with the Approach A changes:

1. Add upgrade-stash-cleanup.sh to RUNTIME_SCRIPTS so it ships in the
   release tarball. Tenants need it to be able to recover from stale
   upgrade-* git stashes on their own hosts.

2. Copy scripts/lib/ wholesale into the staged release tree. Without this,
   upgrade.sh's `. scripts/lib/mkdocs-snapshot.sh` source line silently
   fails on release installs (the file isn't there), and the pre-upgrade
   tenant-docs snapshot wouldn't fire — defeating the no-regrets fallback.

Bunker Admin
This commit is contained in:
bunker-admin 2026-05-21 10:36:28 -06:00
parent 9613c3ec81
commit a7d3dd772b

View File

@ -126,7 +126,7 @@ RUNTIME_SCRIPTS=(
install.sh install.sh
nocodb-init.sh gitea-init.sh mkdocs-entrypoint.sh nocodb-init.sh gitea-init.sh mkdocs-entrypoint.sh
backup.sh restore.sh backup.sh restore.sh
upgrade.sh upgrade-check.sh upgrade-watcher.sh upgrade.sh upgrade-check.sh upgrade-watcher.sh upgrade-stash-cleanup.sh
uninstall.sh test-deployment.sh uninstall.sh test-deployment.sh
validate-env.sh pangolin-teardown.sh ccp-deregister.sh register-with-ccp.sh validate-env.sh pangolin-teardown.sh ccp-deregister.sh register-with-ccp.sh
update-env.sh update-env.sh
@ -178,6 +178,13 @@ if [[ -f "$PROJECT_DIR/scripts/mkdocs-build-trigger.py" ]]; then
cp "$PROJECT_DIR/scripts/mkdocs-build-trigger.py" "$STAGE_DIR/scripts/" cp "$PROJECT_DIR/scripts/mkdocs-build-trigger.py" "$STAGE_DIR/scripts/"
fi fi
# Shared shell libraries (scripts/lib/) — sourced by upgrade.sh + image-upgrade.sh.
# Whole directory ships verbatim; safe because nothing executable lives here
# besides the .sh helpers that the runtime scripts depend on.
if [[ -d "$PROJECT_DIR/scripts/lib" ]]; then
cp -a "$PROJECT_DIR/scripts/lib" "$STAGE_DIR/scripts/"
fi
# Systemd units # Systemd units
if [[ -d "$PROJECT_DIR/scripts/systemd" ]]; then if [[ -d "$PROJECT_DIR/scripts/systemd" ]]; then
cp -r "$PROJECT_DIR/scripts/systemd" "$STAGE_DIR/scripts/" cp -r "$PROJECT_DIR/scripts/systemd" "$STAGE_DIR/scripts/"