Deploy script: roll back once (not inside subshells); docs; bump to 1.37.4
CI / Backend tests (push) Canceled after 0s
CI / Frontend lint, typecheck, build (push) Canceled after 0s
CI / End-to-end tests (push) Canceled after 0s
CI / Deploy tagged release (push) Canceled after 0s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-23 16:20:22 +02:00
co-authored by Claude Opus 5.5
parent a9c7a1129b
commit 96adf20cf0
10 changed files with 36 additions and 12 deletions
+2
View File
@@ -58,6 +58,8 @@ echo "==> Backing up the database"
(cd backend && node -e "require('dotenv').config(); require('./src/utils/backupUtils').runBackup().then(r => console.log(' ', r.filename)).catch(e => { console.error(' Backup failed:', e.message); process.exit(1); })")
rollback() {
# set -E passes this trap into ( … ) subshells too; only the script itself rolls back.
if [ "$BASH_SUBSHELL" -gt 0 ]; then return; fi
echo "!!> Deploy failed — going back to $PREVIOUS (the running version was not touched)"
clear_pm2_config
git checkout -q "$PREVIOUS"