electron/script/start-goma.ps1

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 строки
554 B
PowerShell
Исходник Обычный вид История

2020-08-27 17:31:51 +03:00
param([string]$gomaDir=$PWD)
$cmdPath = Join-Path -Path $gomaDir -ChildPath "goma_ctl.py"
2020-08-27 17:31:51 +03:00
Start-Process -FilePath cmd -ArgumentList "/C", "python", "$cmdPath", "ensure_start"
$timedOut = $false; $waitTime = 0; $waitIncrement = 5; $timeout=120;
Do { sleep $waitIncrement; $timedOut = (($waitTime+=$waitIncrement) -gt $timeout); iex "$gomaDir\gomacc.exe port 2" > $null; } Until(($LASTEXITCODE -eq 0) -or $timedOut)
if ($timedOut) {
write-error 'Timed out waiting for goma to start'; exit 1;
2020-08-27 17:31:51 +03:00
} else {
Write-Output "Successfully started goma!"
}