f
This commit is contained in:
@@ -1131,7 +1131,13 @@ if (Test-Path (Join-Path $repo ".git")) {
|
|||||||
}
|
}
|
||||||
if (-not $skip) {
|
if (-not $skip) {
|
||||||
Write-Host "Checking for updates..." -ForegroundColor Gray
|
Write-Host "Checking for updates..." -ForegroundColor Gray
|
||||||
git -C "$repo" pull --ff-only --quiet
|
$update = git -C "$repo" pull --ff-only 2>&1
|
||||||
|
if ($update -like "*Updating*" -or $update -like "*Fast-forward*") {
|
||||||
|
Clear-Host
|
||||||
|
Write-Host "Medeia-Macina has been updated. Please restart the application to apply changes." -ForegroundColor Cyan
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
|
Clear-Host
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch {}
|
} catch {}
|
||||||
@@ -1193,7 +1199,13 @@ if (Test-Path (Join-Path $repo 'CLI.py')) {
|
|||||||
" )\n"
|
" )\n"
|
||||||
" if \"!AUTO_UPDATE!\" == \"true\" (\n"
|
" if \"!AUTO_UPDATE!\" == \"true\" (\n"
|
||||||
" echo Checking for updates...\n"
|
" echo Checking for updates...\n"
|
||||||
" git -C \"!REPO!\" pull --ff-only --quiet\n"
|
" git -C \"!REPO!\" pull --ff-only | findstr /i /c:\"Updating\" /c:\"Fast-forward\" >nul 2>&1\n"
|
||||||
|
" if !errorlevel! == 0 (\n"
|
||||||
|
" cls\n"
|
||||||
|
" echo Medeia-Macina has been updated. Please restart the application to apply changes.\n"
|
||||||
|
" exit /b 0\n"
|
||||||
|
" )\n"
|
||||||
|
" cls\n"
|
||||||
" )\n"
|
" )\n"
|
||||||
" )\n"
|
" )\n"
|
||||||
")\n"
|
")\n"
|
||||||
@@ -1369,7 +1381,13 @@ if (Test-Path (Join-Path $repo 'CLI.py')) {
|
|||||||
' fi\n'
|
' fi\n'
|
||||||
' if [ "$AUTO_UPDATE" = "true" ]; then\n'
|
' if [ "$AUTO_UPDATE" = "true" ]; then\n'
|
||||||
' echo "Checking for updates..."\n'
|
' echo "Checking for updates..."\n'
|
||||||
' git -C "$REPO" pull --ff-only --quiet || true\n'
|
' UPDATE_OUT=$(git -C "$REPO" pull --ff-only 2>&1)\n'
|
||||||
|
' if echo "$UPDATE_OUT" | grep -qiE \'Updating|Fast-forward\'; then\n'
|
||||||
|
' clear\n'
|
||||||
|
' echo "Medeia-Macina has been updated. Please restart the application to apply changes."\n'
|
||||||
|
' exit 0\n'
|
||||||
|
' fi\n'
|
||||||
|
' clear\n'
|
||||||
' fi\n'
|
' fi\n'
|
||||||
"fi\n"
|
"fi\n"
|
||||||
"\n"
|
"\n"
|
||||||
|
|||||||
Reference in New Issue
Block a user