diff --git a/app/Console/Commands/CheckUpdates.php b/app/Console/Commands/CheckUpdates.php index 8e54350..1c3c0df 100644 --- a/app/Console/Commands/CheckUpdates.php +++ b/app/Console/Commands/CheckUpdates.php @@ -77,13 +77,7 @@ class CheckUpdates extends Command private function readInstalledVersionNorm(): ?string { - // Lokal: git describe gibt immer den aktuellen Stand - if (app()->isLocal()) { - $tag = @trim((string) shell_exec('git -C ' . escapeshellarg(base_path()) . ' describe --tags --abbrev=0 2>/dev/null')); - $v = $this->normalizeVersion($tag); - if ($v) return $v; - } - + // Version-Datei ist autoritativ — immer zuerst prüfen $paths = [ '/var/lib/mailwolt/version', base_path('VERSION'), @@ -93,7 +87,11 @@ class CheckUpdates extends Command if ($raw !== '') return $this->normalizeVersion($raw); } $raw = $this->readInstalledVersionRaw(); - return $raw ? $this->normalizeVersion($raw) : null; + if ($raw) return $this->normalizeVersion($raw); + + // Nur wenn keine Version-Datei existiert (z.B. frische Dev-Umgebung) + $tag = @trim((string) shell_exec('git -C ' . escapeshellarg(base_path()) . ' describe --tags --abbrev=0 2>/dev/null')); + return $this->normalizeVersion($tag); } private function readInstalledVersionRaw(): ?string