Ermögliche das Abrufen von Zeitkorrekturen für ein spezifisches Datum und aktualisiere die Benutzeroberfläche entsprechend
All checks were successful
Deploy production / deploy (push) Successful in 48s
All checks were successful
Deploy production / deploy (push) Successful in 48s
This commit is contained in:
66
deploy.sh
66
deploy.sh
@@ -184,6 +184,11 @@ copy_project_files() {
|
||||
|
||||
print_info "Kopiere Frontend..."
|
||||
rsync -av --exclude 'node_modules' --exclude 'dist' --exclude '.env*' --delete "$CURRENT_DIR/frontend/" "$FRONTEND_DIR/"
|
||||
|
||||
# package.json und package-lock.json gehören zum npm-Workspace im Root und
|
||||
# gelten gemeinsam für Backend und Frontend.
|
||||
print_info "Kopiere Workspace-Metadaten..."
|
||||
rsync -av "$CURRENT_DIR/package.json" "$CURRENT_DIR/package-lock.json" "$PROJECT_DIR/"
|
||||
|
||||
print_info "Kopiere Root-Dateien..."
|
||||
rsync -av --exclude 'node_modules' --exclude '.git' --exclude 'frontend' --exclude 'backend' \
|
||||
@@ -480,34 +485,23 @@ do_update() {
|
||||
print_info "Kopiere Konfigurations-Dateien..."
|
||||
rsync -av "$CURRENT_DIR"/*.{sh,conf,md,service} "$PROJECT_DIR/" 2>/dev/null || true
|
||||
|
||||
# Backend aktualisieren
|
||||
print_info "Aktualisiere Backend Dependencies..."
|
||||
cd $BACKEND_DIR
|
||||
|
||||
# Prüfe ob package-lock.json existiert
|
||||
if [ ! -f "package-lock.json" ]; then
|
||||
print_warning "package-lock.json fehlt! Verwende npm install statt npm ci"
|
||||
npm install --no-audit --no-fund --loglevel=warn
|
||||
else
|
||||
npm config set fund false >/dev/null 2>&1 || true
|
||||
npm config set audit false >/dev/null 2>&1 || true
|
||||
npm config set progress false >/dev/null 2>&1 || true
|
||||
npm config set loglevel warn >/dev/null 2>&1 || true
|
||||
|
||||
# Backend braucht alle Dependencies (auch dev für Build-Tools)
|
||||
if ! npm ci --no-audit --no-fund --loglevel=warn 2>&1; then
|
||||
print_warning "npm ci fehlgeschlagen. Fallback auf npm install..."
|
||||
rm -rf node_modules
|
||||
npm install --no-audit --no-fund --loglevel=warn || {
|
||||
print_error "npm install (Backend Update) fehlgeschlagen"
|
||||
exit 1
|
||||
}
|
||||
fi
|
||||
fi
|
||||
# Dependencies einmal im Workspace-Root installieren. Das Lockfile enthält
|
||||
# beide Teilprojekte; getrennte package-lock.json-Dateien sind absichtlich
|
||||
# nicht vorhanden.
|
||||
print_info "Aktualisiere Workspace-Dependencies..."
|
||||
cd "$PROJECT_DIR"
|
||||
npm config set fund false >/dev/null 2>&1 || true
|
||||
npm config set audit false >/dev/null 2>&1 || true
|
||||
npm config set progress false >/dev/null 2>&1 || true
|
||||
npm config set loglevel warn >/dev/null 2>&1 || true
|
||||
npm ci --include=dev --no-audit --no-fund --loglevel=warn || {
|
||||
print_error "npm ci (Workspace-Update) fehlgeschlagen"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Frontend aktualisieren
|
||||
print_info "Aktualisiere Frontend..."
|
||||
cd $FRONTEND_DIR
|
||||
cd "$FRONTEND_DIR"
|
||||
|
||||
# .env.production prüfen/erstellen
|
||||
if [ ! -f ".env.production" ]; then
|
||||
@@ -518,27 +512,6 @@ VITE_API_URL=/api
|
||||
EOF
|
||||
fi
|
||||
|
||||
# Prüfe ob package-lock.json existiert
|
||||
if [ ! -f "package-lock.json" ]; then
|
||||
print_warning "package-lock.json fehlt! Verwende npm install statt npm ci"
|
||||
npm install --no-audit --no-fund --loglevel=warn
|
||||
else
|
||||
npm config set fund false >/dev/null 2>&1 || true
|
||||
npm config set audit false >/dev/null 2>&1 || true
|
||||
npm config set progress false >/dev/null 2>&1 || true
|
||||
npm config set loglevel warn >/dev/null 2>&1 || true
|
||||
|
||||
# Frontend braucht dev-Dependencies für den Build (vite, etc.)
|
||||
if ! npm ci --no-audit --no-fund --loglevel=warn 2>&1; then
|
||||
print_warning "npm ci fehlgeschlagen. Fallback auf npm install..."
|
||||
rm -rf node_modules
|
||||
npm install --no-audit --no-fund --loglevel=warn || {
|
||||
print_error "npm install (Frontend Update) fehlgeschlagen"
|
||||
exit 1
|
||||
}
|
||||
fi
|
||||
fi
|
||||
|
||||
# Sauberer Build
|
||||
rm -rf dist/
|
||||
npm run build
|
||||
@@ -824,4 +797,3 @@ case "${1:-help}" in
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user