ci: persist publish-finish exit code to side-channel + force explicit exit
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -282,10 +282,14 @@ jobs:
|
||||
Write-Host $_.ScriptStackTrace
|
||||
$code = 1
|
||||
} finally {
|
||||
Stop-Transcript
|
||||
try { Stop-Transcript -ErrorAction SilentlyContinue } catch {}
|
||||
}
|
||||
Write-Host "Single-step exit code: $code"
|
||||
exit $code
|
||||
# Persist exit code to a side-channel file so we can inspect even if
|
||||
# the transcript got closed before the value was written.
|
||||
"code=$code at $(Get-Date)" | Out-File -FilePath publish-finish.log -Encoding ASCII
|
||||
# Force explicit exit -- ignore any trailing $LASTEXITCODE noise from
|
||||
# native commands above.
|
||||
if ($code -ne 0) { exit $code } else { exit 0 }
|
||||
|
||||
- name: Pack + upload publish.tar.gz
|
||||
if: success()
|
||||
@@ -318,7 +322,7 @@ jobs:
|
||||
$pair = "$($env:REG_USER):$($env:REG_PASS)"
|
||||
$auth = "Basic " + [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes($pair))
|
||||
$base = "https://gitea.dev.marcus-law.co.il/api/packages/espocrm-extensions/generic/outlook-addin-publish-log/run-$env:RUN_ID"
|
||||
foreach ($f in @('publish.console.log','publish-msbuild.log','src/OutlookAddin/OutlookAddin.csproj')) {
|
||||
foreach ($f in @('publish.console.log','publish-msbuild.log','publish-finish.log','src/OutlookAddin/OutlookAddin.csproj')) {
|
||||
if (Test-Path $f) {
|
||||
$name = (Split-Path $f -Leaf)
|
||||
Write-Host "PUT $base/$name"
|
||||
|
||||
Reference in New Issue
Block a user