Fix Soul Pass #1: single mouse-capture authority, raw OS argv window check, and release script hardening

This commit is contained in:
Meta Vens 2026-12-05 20:31:30 +01:00
commit 8710bed79d
2 changed files with 37 additions and 18 deletions

View file

@ -197,6 +197,11 @@ $RepoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..")).Path
$ClientDir = Join-Path $RepoRoot "client"
$AssetsSrcDir = Join-Path $RepoRoot "assets"
$fullSha = (& git -C $RepoRoot rev-parse HEAD).Trim()
if ($LASTEXITCODE -ne 0 -or [string]::IsNullOrWhiteSpace($fullSha)) {
throw "Failed to resolve git HEAD SHA."
}
if ([string]::IsNullOrWhiteSpace($Tag)) {
$shortSha = (& git -C $RepoRoot rev-parse --short HEAD).Trim()
if ($LASTEXITCODE -ne 0 -or [string]::IsNullOrWhiteSpace($shortSha)) {
@ -225,6 +230,7 @@ $env:YMIR_ROOT = $YmirRoot
$env:CULTLIB_ROOT = $CultLibRoot
$env:MSBUILDDISABLENODEREUSE = "1"
$env:DOTNET_CLI_DO_NOT_USE_MSBUILD_SERVER = "1"
$env:UseSharedCompilation = "false"
Write-Host "=== Rust to Dust win64 Release Build ==="
Write-Host "RepoRoot : $RepoRoot"
@ -354,8 +360,12 @@ if ($Publish) {
}
catch {
$statusCode = $null
if ($_.Exception.Response -and $_.Exception.Response.StatusCode) {
$statusCode = [int]$_.Exception.Response.StatusCode
$ex = $_.Exception
if ($ex -is [System.Net.WebException] -and $ex.Response) {
$statusCode = [int]$ex.Response.StatusCode
}
elseif ($ex.PSObject.Properties['Response'] -and $ex.Response -and $ex.Response.PSObject.Properties['StatusCode']) {
$statusCode = [int]$ex.Response.StatusCode
}
if ($statusCode -ne 404) {
throw
@ -365,13 +375,14 @@ if ($Publish) {
$releaseNotes = "Standalone Windows x64 build ($Tag). Unzip and run RustToDust.exe."
if ($null -eq $release) {
$release = Invoke-ForgeApiJson -Method "POST" -Url "$apiBase/releases" -Token $resolvedToken -Body @{
tag_name = $Tag
name = $Tag
body = $releaseNotes
draft = $false
prerelease = $false
tag_name = $Tag
target_commitish = $fullSha
name = $Tag
body = $releaseNotes
draft = $false
prerelease = $false
}
Write-Host "Created release id=$($release.id) for tag '$Tag'."
Write-Host "Created release id=$($release.id) for tag '$Tag' ($fullSha)."
}
else {
$release = Invoke-ForgeApiJson -Method "PATCH" -Url "$apiBase/releases/$($release.id)" -Token $resolvedToken -Body @{
@ -394,7 +405,7 @@ if ($Publish) {
}
Write-Host "Uploading '$assetName'..."
$uploadUrl = "$apiBase/releases/$($release.id)/assets?name=$([Uri]::EscapeDataString($assetName))"
& curl.exe -fS -X POST -H "Authorization: token $resolvedToken" -F "attachment=@$assetPath" $uploadUrl | Out-Null
& curl.exe -fsS -X POST -H "Authorization: token $resolvedToken" -F "attachment=@$assetPath" $uploadUrl | Out-Null
if ($LASTEXITCODE -ne 0) {
throw "curl.exe failed uploading '$assetName' (exit $LASTEXITCODE)."
}