Fix: CheckUpdates liest Version-Datei vor git-describe (APP_ENV=local Bug)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
main v1.1.289
boban 2026-04-26 10:30:07 +02:00
parent 1b79454df5
commit 29ef2b6a2c
1 changed files with 6 additions and 8 deletions

View File

@ -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