CI: публикация релиза без пересборки (-SkipBuild)
This commit is contained in:
+13
-5
@@ -46,6 +46,7 @@ param(
|
|||||||
[switch]$Publish,
|
[switch]$Publish,
|
||||||
[string]$Tag = '',
|
[string]$Tag = '',
|
||||||
[switch]$Public,
|
[switch]$Public,
|
||||||
|
[switch]$SkipBuild,
|
||||||
[string]$Token = $env:GITEA_TOKEN,
|
[string]$Token = $env:GITEA_TOKEN,
|
||||||
[string]$GiteaUrl = 'https://git.meshinfo.ru',
|
[string]$GiteaUrl = 'https://git.meshinfo.ru',
|
||||||
[string]$Repo = 'shade/MeshCore'
|
[string]$Repo = 'shade/MeshCore'
|
||||||
@@ -98,12 +99,19 @@ try {
|
|||||||
|
|
||||||
# out/ чистим, иначе в релиз попадут файлы прошлых сборок
|
# out/ чистим, иначе в релиз попадут файлы прошлых сборок
|
||||||
$outDir = Join-Path $root '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 ''
|
||||||
Write-Host "=== сборка (версия $Version) ===" -ForegroundColor Cyan
|
Write-Host "=== сборка (версия $Version) ===" -ForegroundColor Cyan
|
||||||
& $bash 'ci/build-firmwares.sh'
|
& $bash 'ci/build-firmwares.sh'
|
||||||
$buildExit = $LASTEXITCODE
|
$buildExit = $LASTEXITCODE
|
||||||
|
}
|
||||||
|
|
||||||
$files = @(Get-ChildItem $outDir -File -ErrorAction SilentlyContinue)
|
$files = @(Get-ChildItem $outDir -File -ErrorAction SilentlyContinue)
|
||||||
Write-Host ''
|
Write-Host ''
|
||||||
|
|||||||
Reference in New Issue
Block a user