From 7e19dea716eb89d163dde01b47b0bf6d9824da25 Mon Sep 17 00:00:00 2001 From: Dmitriy Fofanov Date: Mon, 23 Feb 2026 22:29:32 +0300 Subject: [PATCH] =?UTF-8?q?Fix:=20=D0=BE=D0=B1=D1=80=D0=B0=D0=B1=D0=BE?= =?UTF-8?q?=D1=82=D0=BA=D0=B0=20stderr=20=D0=BE=D1=82=20git=20push=20?= =?UTF-8?q?=D0=B2=20release.ps1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/release.ps1 | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/scripts/release.ps1 b/scripts/release.ps1 index 509595c..11f9f09 100644 --- a/scripts/release.ps1 +++ b/scripts/release.ps1 @@ -61,8 +61,11 @@ $env:GOOS = '' $env:GOARCH = '' Remove-Item Env:GOARM, Env:GOMIPS -ErrorAction SilentlyContinue +$ErrorActionPreference = "Continue" & make build-all VERSION=$Version -if ($LASTEXITCODE -ne 0) { +$buildExit = $LASTEXITCODE +$ErrorActionPreference = "Stop" +if ($buildExit -ne 0) { Write-Host "!!! Ошибка компиляции." -ForegroundColor Red exit 1 } @@ -112,8 +115,10 @@ if ($existingTag) { } else { git tag -a $tag -m "Release $tag" } -git push origin $tag 2>$null -git push origin master 2>$null +$ErrorActionPreference = "Continue" +git push origin $tag 2>&1 | Out-Null +git push origin master 2>&1 | Out-Null +$ErrorActionPreference = "Stop" # ── Проверка токена ─────────────────────────────────────────────────────────── @@ -136,7 +141,9 @@ Write-Host ">>> [5/6] Создание релиза в Gitea..." -ForegroundColo $commit = git rev-parse HEAD $date = Get-Date -Format 'dd.MM.yyyy HH:mm UTC' $prevTag = '' -try { $prevTag = git describe --tags --abbrev=0 "$tag^" 2>$null } catch {} +$ErrorActionPreference = "Continue" +try { $prevTag = git describe --tags --abbrev=0 "$tag^" 2>&1 | Where-Object { $_ -is [string] } } catch {} +$ErrorActionPreference = "Stop" $rawLog = @() if ($prevTag) {