feat: UpdateAgent Selbstaktualisierung & kopflose Installation, .NET 10 Migration, Backend- & SDK-Fixes

- .NET 10 Migration: Alle .NET-Projekte auf net10.0 umgestellt (#459)
- Client-SDK: ResolveAgentPath bereinigt und DLL-Pruefung ergaenzt (#458)
- Packager: Commit-Ermittlung aus publishDir / Assembly InformationalVersion (#456)
- BuildInfo.targets: ExitCode-Abfang und Regex-Validierung gegen Git-Fehlertexte (#363)
- UpdateService: Re-Publish erhaelt bestehende Manifeste und Werte (#457)
- Bugtracker API: on_roadmap-Filter in manage?action=list durchgereicht (#349)
- Watchdog API: project_slug-Filter in GET /status ergaenzt (#420)
- UpdateService API: no_release_for_platform mit verfuegbaren Plattformen (#421)
- Bugtracker Core: Fehler-Normalisierung gegen zersplitterte error_hashes (#419)
- UpdateAgent: Kopfloser Installationsmodus via --answers (#89)
- Installer & Agent: Automatische Selbstaktualisierung beim Start
- Tooling: AGENTS.md, CLAUDE.md und Standalone-CLI scripts/dc.py hinzugefuegt
This commit is contained in:
Deploymentcenter Bot
2026-09-02 23:43:37 +02:00
parent 8447b2d10a
commit 087f4392a9
26 changed files with 1582 additions and 67 deletions
+67 -5
View File
@@ -14,6 +14,35 @@ set -eu
BASE_URL="${DC_BASE_URL:-https://dc.mhdf.de}"
TARGET_DIR="${DC_INSTALL_DIR:-}"
CHECK_ONLY=0
FORCE=0
for arg in "$@"; do
case "$arg" in
--check|--pruefen) CHECK_ONLY=1 ;;
--force) FORCE=1 ;;
esac
done
# --------------------------------------------------- Selbstaktualisierung Skript
if [ -f "$0" ] && [ "$0" != "sh" ] && [ "$0" != "bash" ]; then
if command -v curl >/dev/null 2>&1; then
remote_script="$(curl -fsSL "$BASE_URL/installer/install.sh" 2>/dev/null || true)"
elif command -v wget >/dev/null 2>&1; then
remote_script="$(wget -qO- "$BASE_URL/installer/install.sh" 2>/dev/null || true)"
else
remote_script=""
fi
if [ -n "$remote_script" ]; then
current_script="$(cat "$0")"
if [ "$remote_script" != "$current_script" ]; then
printf '%s\n' "$remote_script" > "$0"
chmod +x "$0" 2>/dev/null || true
echo "Installer-Skript ($0) wurde selbststaendig aktualisiert."
fi
fi
fi
# ---------------------------------------------------------------- Plattform
os="$(uname -s)"
@@ -62,15 +91,48 @@ fi
tmp="$(mktemp -d)"
# shellcheck disable=SC2064
trap "rm -rf '$tmp'" EXIT INT TERM
trap 'rm -rf "$tmp"' EXIT INT TERM
# ------------------------------------------------------------- Pruefsumme abrufen
fetch "$BASE_URL/installer/$binary.sha256" "$tmp/agent.sha256"
expected="$(tr -d ' \t\r\n' < "$tmp/agent.sha256")"
# ------------------------------------------------------------- Bestandspruefung
if [ -f "$target" ] && [ "$FORCE" -eq 0 ]; then
if command -v sha256sum >/dev/null 2>&1; then
current_hash="$(sha256sum "$target" | cut -d' ' -f1)"
elif command -v shasum >/dev/null 2>&1; then
current_hash="$(shasum -a 256 "$target" | cut -d' ' -f1)"
else
current_hash=""
fi
if [ -n "$current_hash" ] && [ "$current_hash" = "$expected" ]; then
echo "Update-Agent ist bereits auf dem neuesten Stand ($target)."
if [ "$CHECK_ONLY" -eq 1 ]; then
exit 0
fi
echo ""
echo "Weiter mit:"
echo " $target --action install"
echo ""
echo "Nur diese Maschine ueberwachen, ohne etwas zu installieren:"
echo " $target --action monitor"
exit 0
else
echo "Aktualisierung fuer Update-Agent verfuegbar. Lade neue Fassung..."
fi
fi
if [ "$CHECK_ONLY" -eq 1 ]; then
echo "Neue Version von $binary ist verfuegbar (SHA256: $expected)."
exit 0
fi
echo "Lade $binary von $BASE_URL ..."
fetch "$BASE_URL/installer/$binary" "$tmp/agent"
fetch "$BASE_URL/installer/$binary.sha256" "$tmp/agent.sha256"
# ------------------------------------------------------------- Pruefsumme
expected="$(tr -d ' \t\r\n' < "$tmp/agent.sha256")"
# ------------------------------------------------------------- Pruefsumme pruefen
if command -v sha256sum >/dev/null 2>&1; then
actual="$(sha256sum "$tmp/agent" | cut -d' ' -f1)"
elif command -v shasum >/dev/null 2>&1; then