Fix version.php to read from .version file

This commit is contained in:
2026-01-01 19:09:06 +11:00
parent d9faee1114
commit c9677d5e3e
2 changed files with 51 additions and 42 deletions

View File

@@ -37,7 +37,13 @@ if ($action === 'update') {
"cd $installDir && git reset --hard origin/main",
"cd $installDir && git pull origin main",
"cp -r $installDir/webui/* $webDir/",
"chown -R www-data:www-data $webDir"
"chown -R www-data:www-data $webDir",
// Create .version file with git info
"cd $installDir && git rev-parse --short HEAD > $webDir/.version",
"cd $installDir && git rev-parse HEAD >> $webDir/.version",
"cd $installDir && git rev-parse --abbrev-ref HEAD >> $webDir/.version",
"cd $installDir && git log -1 --format=%ci >> $webDir/.version",
"chown www-data:www-data $webDir/.version"
];
$output = [];