Skip to content

armgit / WacOS

Public Imported from GitHub
0

A new style desktop shell for Windows 11: menu bar, Dock, Finder, Spotlight, Control Center and Liquid Glass, in native C++.

Rust

Publish: cargo's progress on stderr no longer aborts -SoRust

Eternity07062858696f335be0
diff --git a/tools/publicar.ps1 b/tools/publicar.ps1
index eb685a1..d6a8433 100644
--- a/tools/publicar.ps1
+++ b/tools/publicar.ps1
@@ -37,8 +37,11 @@ if ($SoRust) {
$rt = Join-Path $root '.claude\worktrees\rust-port-teste-23da8b\rust-teste'
if (-not (Test-Path (Join-Path $rt 'build-rust.ps1'))) { L 'ERRO: worktree do Rust não encontrado'; exit 1 }
L "edição única em Rust: compilando ($tag)..."
+ # o cargo escreve o progresso na saída de erro: com 'Stop' isso derrubava a publicação no meio
+ $eap = $ErrorActionPreference; $ErrorActionPreference = 'Continue'
& powershell -NoProfile -ExecutionPolicy Bypass -File (Join-Path $rt 'build-rust.ps1') -Unica -Versao $tag *>&1 | ForEach-Object { L "$_" }
- if ($LASTEXITCODE -ne 0) { L 'ERRO: o build-rust.ps1 -Unica falhou'; exit 1 }
+ $codigo = $LASTEXITCODE; $ErrorActionPreference = $eap
+ if ($codigo -ne 0) { L 'ERRO: o build-rust.ps1 -Unica falhou'; exit 1 }
$binPacote = Join-Path $rt 'dist\WacOS-Unica\bin'
if (-not (Test-Path (Join-Path $binPacote 'WacOSShell.exe'))) { L 'ERRO: a edição única não gerou o WacOSShell.exe'; exit 1 }
# a versão que o atualizador compara: a da release, com o commit do Rust
@@ -63,8 +66,10 @@ if ($RustDist -and (Test-Path (Join-Path $RustDist 'WacOS-Rust.zip'))) {
$empArgs = @('-SemSistema', '-SemAjustes')
if ($binPacote) { $empArgs += @('-Bin', $binPacote) }
+$eap = $ErrorActionPreference; $ErrorActionPreference = 'Continue'
& powershell -NoProfile -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot 'empacotar.ps1') @empArgs *>&1 | ForEach-Object { L "$_" }
-if ($LASTEXITCODE -ne 0) { L 'ERRO: o empacotar.ps1 falhou'; exit 1 } # senão subia o zip mais recente, de outra rodada
+$codigoEmp = $LASTEXITCODE; $ErrorActionPreference = $eap
+if ($codigoEmp -ne 0) { L 'ERRO: o empacotar.ps1 falhou'; exit 1 } # senão subia o zip mais recente, de outra rodada
$zip = Get-ChildItem (Join-Path $root 'dist') -Filter 'WacOS-*.zip' | Sort-Object LastWriteTime -Descending | Select-Object -First 1
if (-not $zip) { L 'ERRO: o pacote não foi gerado'; exit 1 }