deploy / deploy (push) Successful in 1m12s
- Workflow : runs-on bobinoo (le runner a les deux étiquettes pendant la transition). - Dossier de déploiement /srv/bobinoo (BOBINOO_ROOT, AZUUCINE_ROOT accepté pour compatibilité). - Config nginx, bootstrap, RUNNER.md, admin.md, CLAUDE.md : conteneur et runner « bobinoo ». - Nom du paquet npm et du plugin Vite. - Inchangé volontairement : clés localStorage, bases IndexedDB, fonctions SQL azuu_*, secret Vault, format d'export, migrations (renommer casserait les données existantes). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
15 lines
808 B
Bash
Executable File
15 lines
808 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Revient à la version précédente (ou à celle donnée en argument). À lancer en root sur le VPS :
|
|
# /srv/bobinoo/rollback.sh -> version juste avant la courante
|
|
# /srv/bobinoo/rollback.sh <nom> -> une version précise (voir ls /srv/bobinoo/releases)
|
|
set -euo pipefail
|
|
ROOT=${BOBINOO_ROOT:-${AZUUCINE_ROOT:-/srv/bobinoo}}
|
|
CUR=$(basename "$(readlink "$ROOT/current")")
|
|
if [ -n "${1:-}" ]; then TARGET=$1
|
|
else TARGET=$(ls -1 "$ROOT/releases" | sort -r | grep -A1 -x "$CUR" | tail -n1)
|
|
fi
|
|
[ -n "$TARGET" ] && [ "$TARGET" != "$CUR" ] && [ -d "$ROOT/releases/$TARGET" ] || { echo "aucune version cible"; exit 1; }
|
|
ln -s "releases/$TARGET" "$ROOT/current.tmp"; mv -T "$ROOT/current.tmp" "$ROOT/current"
|
|
date -u +%FT%TZ > "$ROOT/.deployed"
|
|
echo "retour : $CUR -> $TARGET"
|