deploy.sh nur auf Live, dev/app-bak entfernt, Anleitung zur bereinigten Historie

- deploy.sh bricht ab, wenn APP_ENV nicht production ist
- dev/app-bak (altes Code-Backup) geloescht
- README Abschnitt H: Historie neu geschrieben

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kevin Adametz 2026-10-08 10:42:27 +00:00
parent 2278e743e1
commit e89cffa7b6
323 changed files with 22 additions and 56629 deletions

View file

@ -72,6 +72,15 @@ if [[ ! -f artisan || ! -d .git ]]; then
exit 2
fi
# Nur auf Live: lokal würde das Skript die Entwicklungsumgebung in den
# Wartungsmodus setzen und mit --no-dev die Dev-Pakete entfernen.
app_env="$(php artisan env --no-ansi 2>/dev/null || true)"
if [[ "$app_env" != *"[production]"* && -z "${DEPLOY_ALLOW_NON_PRODUCTION:-}" ]]; then
echo "Nur auf dem Live-Server aufrufen — hier ist APP_ENV nicht production." >&2
echo "(${app_env:-php artisan env lieferte nichts})" >&2
exit 2
fi
step() { printf '\n==> %s\n' "$*"; }
step "Arbeitsverzeichnis prüfen"