Publish Zonghengjia Windows 0.4.1 client source

This commit is contained in:
2026-11-30 13:57:46 +08:00
parent 7a00f97910
commit 859a1dec5e
16 changed files with 307 additions and 23 deletions
@@ -7,7 +7,7 @@ param(
[string]$DependencyPayloadRoot,
[ValidateSet(2,3,4)][int]$PreviewRevision = 2,
[switch]$FormalChannel,
[ValidateSet('0.2.20','0.2.21','0.2.22','0.2.23','0.2.24','0.3.0','0.4.0')][string]$FormalVersion = '0.2.21'
[ValidateSet('0.2.20','0.2.21','0.2.22','0.2.23','0.2.24','0.3.0','0.4.0','0.4.1')][string]$FormalVersion = '0.2.21'
)
$ErrorActionPreference='Stop'
Set-StrictMode -Version Latest
@@ -45,7 +45,7 @@ function Copy-Checked([string]$From,[string]$To){
if((Get-FileHash -LiteralPath $To).Hash -cne $hash -or (Get-FileHash -LiteralPath $From).Hash -cne $hash){throw 'Source changed during snapshot'}
return $hash
}
$releaseEvidence=if($FormalChannel -and $FormalVersion -eq '0.4.0'){
$releaseEvidence=if($FormalChannel -and $FormalVersion -in @('0.4.0','0.4.1')){
@($releaseNotes)
}else{
@($releaseNotes,'release/TAILNET-PRIORITY-20260924.md','release/INSTALLER-GUARDIAN-GATE-20260924.md','release/PRODUCTION-NETWORK-BASELINE-20260924.md')
@@ -54,7 +54,7 @@ $relative=@(Get-ChildItem -LiteralPath $project -File -Filter '*.cs' | ForEach-O
@(Get-ChildItem -LiteralPath (Join-Path $project 'assets') -File | ForEach-Object {'assets/'+$_.Name})+
@(Get-ChildItem -LiteralPath (Join-Path $project 'installer') -File | Where-Object Extension -in @('.nsi','.nsh') | ForEach-Object {'installer/'+$_.Name})+
@('build/Build-TailnetGuardianCandidate.ps1','build/GuardianGateFixture.cs','build/GuardianGateFixture.csproj','build/GuardianApprovalPipe.cs','build/Test-InstallerGuardianGate.ps1',
'build/ProductionNetworkBaseline.ps1','build/Test-ProductionNetworkBaseline.ps1','build/ProductionInstallationBaseline.ps1','build/Test-ProductionInstallationBaseline.ps1','build/OwnedProcessGroup.cs')+$releaseEvidence
'build/ProductionNetworkBaseline.ps1','build/Test-ProductionNetworkBaseline.ps1','build/ProductionInstallationBaseline.ps1','build/Test-ProductionInstallationBaseline.ps1','build/Test-ExactInstallerContents.ps1','build/Invoke-LiveCandidateAcceptance.ps1','build/OwnedProcessGroup.cs')+$releaseEvidence
$snapshot=@(foreach($name in @($relative | Sort-Object -Unique)){
$hash=Copy-Checked (Join-Path $project $name) (Join-Path $source $name)
[ordered]@{Path=$name;Sha256=$hash}
@@ -80,7 +80,7 @@ function Run-Offline([string]$File,[string]$Argument,[int]$Timeout=45){
return $child.ExitCode
} finally {$child.Dispose()}
}
$offlineTests=if($FormalChannel -and $FormalVersion -eq '0.4.0'){
$offlineTests=if($FormalChannel -and $FormalVersion -in @('0.4.0','0.4.1')){
@('single-node-client-self-test','client-runtime-self-test','connection-health-self-test','connection-selection-self-test',
'dashboard-interaction-self-test','chart-freshness-self-test','speed-display-self-test','window-chrome-self-test',
'installation-self-test','update-self-test','uninstall-self-test')
@@ -114,7 +114,7 @@ if($startupExit -ne 0 -or $startup.passed -ne $true){throw 'Offline startup/logi
foreach($name in @('startup-self-test.json','startup-login-test.png')){
Copy-Checked (Join-Path $candidate $name) (Join-Path $evidence $name) | Out-Null
}
if($FormalChannel -and $FormalVersion -in @('0.3.0','0.4.0')){
if($FormalChannel -and $FormalVersion -in @('0.3.0','0.4.0','0.4.1')){
$previewExit=Run-Offline $exe '--render-preview'
$previewReport=Join-Path $candidate 'dashboard-ui-self-test.json'
$preview=Get-Content -LiteralPath $previewReport -Raw | ConvertFrom-Json
@@ -136,7 +136,7 @@ $manifest=@(foreach($name in $expected){
})
Save (Join-Path $payload 'install-manifest.json') $manifest
if((Run-Offline (Join-Path $payload 'VPNPlus.exe') '--installer-verify') -ne 0){throw 'Exact new payload installer verification failed'}
if($FormalChannel -and $FormalVersion -eq '0.4.0'){
if($FormalChannel -and $FormalVersion -in @('0.4.0','0.4.1')){
$payloadTest=Join-Path $root 'payload-self-test'
Copy-Item -LiteralPath $payload -Destination $payloadTest -Recurse
$payloadExe=Join-Path $payloadTest 'VPNPlus.exe'
@@ -158,12 +158,14 @@ $setupHash=(Get-FileHash -LiteralPath $setup).Hash
[IO.File]::WriteAllText(($setup+'.sha256'),($setupHash.ToLowerInvariant()+' '+$filename+[Environment]::NewLine),[Text.Encoding]::ASCII)
$packageInfo=[Diagnostics.FileVersionInfo]::GetVersionInfo($setup)
if($packageInfo.ProductVersion -cne $version -or $packageInfo.FileVersion -cne $version){throw 'Package prerelease metadata mismatch'}
$exactInstallerEvidence=& (Join-Path $source 'build/Test-ExactInstallerContents.ps1') -Installer $setup -ExpectedVersion $baseVersion
[IO.File]::WriteAllText((Join-Path $evidence 'exact-installer-contents.json'),($exactInstallerEvidence -join [Environment]::NewLine),[Text.UTF8Encoding]::new($false))
foreach($row in $manifest){if((Get-FileHash -LiteralPath (Join-Path $payload $row.Path)).Hash -cne $row.Sha256){throw 'Payload changed during packaging'}}
$actual=@(Get-ChildItem -LiteralPath $payload -Recurse -File | ForEach-Object {[IO.Path]::GetRelativePath($payload,$_.FullName).Replace('\','/')})
if(@(Compare-Object (@($expected)+@('install-manifest.json') | Sort-Object) ($actual | Sort-Object)).Count){throw 'Unexpected diagnostics in release payload'}
foreach($row in $snapshot){if((Get-FileHash -LiteralPath (Join-Path $source $row.Path)).Hash -cne $row.Sha256){throw 'Frozen source changed during build'}}
$signatures=@(foreach($file in @($exe,$setup)){[ordered]@{File=[IO.Path]::GetFileName($file);Status=[string](Get-AuthenticodeSignature -LiteralPath $file).Status}})
$notAccepted=if($FormalChannel -and $FormalVersion -eq '0.4.0'){
$notAccepted=if($FormalChannel -and $FormalVersion -in @('0.4.0','0.4.1')){
@('live authenticated VPN004 public session','production in-place UAC upgrade and complete guardian rollback',
'current VPN004 host firewall and upstream availability','physical multi-monitor DPI, drag and snap')
}else{