diff --git a/ci/build-local.ps1 b/ci/build-local.ps1 index 1adf6e9b..25c500cd 100644 --- a/ci/build-local.ps1 +++ b/ci/build-local.ps1 @@ -46,6 +46,7 @@ param( [switch]$Publish, [string]$Tag = '', [switch]$Public, + [switch]$SkipBuild, [string]$Token = $env:GITEA_TOKEN, [string]$GiteaUrl = 'https://git.meshinfo.ru', [string]$Repo = 'shade/MeshCore' @@ -98,12 +99,19 @@ try { # out/ чистим, иначе в релиз попадут файлы прошлых сборок $outDir = Join-Path $root 'out' - if (Test-Path $outDir) { Get-ChildItem $outDir -File | Remove-Item -Force } + $buildExit = 0 + if ($SkipBuild) { + Write-Host '' + Write-Host 'сборка пропущена (-SkipBuild): публикую то, что уже лежит в out/' -ForegroundColor Yellow + } + else { + if (Test-Path $outDir) { Get-ChildItem $outDir -File | Remove-Item -Force } - Write-Host '' - Write-Host "=== сборка (версия $Version) ===" -ForegroundColor Cyan - & $bash 'ci/build-firmwares.sh' - $buildExit = $LASTEXITCODE + Write-Host '' + Write-Host "=== сборка (версия $Version) ===" -ForegroundColor Cyan + & $bash 'ci/build-firmwares.sh' + $buildExit = $LASTEXITCODE + } $files = @(Get-ChildItem $outDir -File -ErrorAction SilentlyContinue) Write-Host ''