Deploy script: roll back once (not inside subshells); docs; bump to 1.37.4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user