Fix: обработка stderr от git push в release.ps1
This commit is contained in:
+11
-4
@@ -61,8 +61,11 @@ $env:GOOS = ''
|
|||||||
$env:GOARCH = ''
|
$env:GOARCH = ''
|
||||||
Remove-Item Env:GOARM, Env:GOMIPS -ErrorAction SilentlyContinue
|
Remove-Item Env:GOARM, Env:GOMIPS -ErrorAction SilentlyContinue
|
||||||
|
|
||||||
|
$ErrorActionPreference = "Continue"
|
||||||
& make build-all VERSION=$Version
|
& make build-all VERSION=$Version
|
||||||
if ($LASTEXITCODE -ne 0) {
|
$buildExit = $LASTEXITCODE
|
||||||
|
$ErrorActionPreference = "Stop"
|
||||||
|
if ($buildExit -ne 0) {
|
||||||
Write-Host "!!! Ошибка компиляции." -ForegroundColor Red
|
Write-Host "!!! Ошибка компиляции." -ForegroundColor Red
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
@@ -112,8 +115,10 @@ if ($existingTag) {
|
|||||||
} else {
|
} else {
|
||||||
git tag -a $tag -m "Release $tag"
|
git tag -a $tag -m "Release $tag"
|
||||||
}
|
}
|
||||||
git push origin $tag 2>$null
|
$ErrorActionPreference = "Continue"
|
||||||
git push origin master 2>$null
|
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
|
$commit = git rev-parse HEAD
|
||||||
$date = Get-Date -Format 'dd.MM.yyyy HH:mm UTC'
|
$date = Get-Date -Format 'dd.MM.yyyy HH:mm UTC'
|
||||||
$prevTag = ''
|
$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 = @()
|
$rawLog = @()
|
||||||
if ($prevTag) {
|
if ($prevTag) {
|
||||||
|
|||||||
Reference in New Issue
Block a user