Publish Zonghengjia Windows 0.4.0 client source
This commit is contained in:
@@ -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')][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')][string]$FormalVersion = '0.2.21'
|
||||
)
|
||||
$ErrorActionPreference='Stop'
|
||||
Set-StrictMode -Version Latest
|
||||
@@ -45,12 +45,16 @@ 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'){
|
||||
@($releaseNotes)
|
||||
}else{
|
||||
@($releaseNotes,'release/TAILNET-PRIORITY-20260924.md','release/INSTALLER-GUARDIAN-GATE-20260924.md','release/PRODUCTION-NETWORK-BASELINE-20260924.md')
|
||||
}
|
||||
$relative=@(Get-ChildItem -LiteralPath $project -File -Filter '*.cs' | ForEach-Object Name)+@('VPNPlus.csproj','app.manifest','README.md','THIRD_PARTY_NOTICES.md')+
|
||||
@(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',
|
||||
$releaseNotes,'release/TAILNET-PRIORITY-20260924.md','release/INSTALLER-GUARDIAN-GATE-20260924.md','release/PRODUCTION-NETWORK-BASELINE-20260924.md')
|
||||
'build/ProductionNetworkBaseline.ps1','build/Test-ProductionNetworkBaseline.ps1','build/ProductionInstallationBaseline.ps1','build/Test-ProductionInstallationBaseline.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}
|
||||
@@ -76,7 +80,13 @@ function Run-Offline([string]$File,[string]$Argument,[int]$Timeout=45){
|
||||
return $child.ExitCode
|
||||
} finally {$child.Dispose()}
|
||||
}
|
||||
$offlineTests=@('tailnet-transport-self-test','connection-health-self-test','connection-selection-self-test','private-auxiliary-self-test','learning-self-test','window-chrome-self-test','installation-self-test')
|
||||
$offlineTests=if($FormalChannel -and $FormalVersion -eq '0.4.0'){
|
||||
@('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')
|
||||
}else{
|
||||
@('tailnet-transport-self-test','connection-health-self-test','connection-selection-self-test','private-auxiliary-self-test','learning-self-test','window-chrome-self-test','installation-self-test')
|
||||
}
|
||||
if($FormalChannel -and $FormalVersion -eq '0.3.0'){
|
||||
$offlineTests+=@('public-tailnet-selection-self-test','learning-sync-coordinator-self-test','tailnet-readiness-self-test','nextgen-lifecycle-self-test','network-handover-self-test','dashboard-interaction-self-test')
|
||||
}
|
||||
@@ -84,9 +94,12 @@ $results=@(foreach($name in $offlineTests){
|
||||
$report=Join-Path $candidate ($name+'.json');if(Test-Path -LiteralPath $report){throw 'Stale offline report'}
|
||||
$exit=Run-Offline $exe ('--'+$name)
|
||||
$parsed=Get-Content -LiteralPath $report -Raw | ConvertFrom-Json
|
||||
$passed=$exit -eq 0 -and $parsed.passed -eq $true -and @($parsed.checks.PSObject.Properties | Where-Object Value -ne $true).Count -eq 0
|
||||
$hasChecks=@($parsed.PSObject.Properties.Name) -contains 'checks'
|
||||
$failedChecks=@(if($hasChecks){$parsed.checks.PSObject.Properties | Where-Object Value -ne $true})
|
||||
$checkCount=if($hasChecks){@($parsed.checks.PSObject.Properties).Count}else{1}
|
||||
$passed=$exit -eq 0 -and $parsed.passed -eq $true -and $failedChecks.Count -eq 0
|
||||
if(-not $passed){throw ('Offline check failed: '+$name)}
|
||||
[ordered]@{Test=$name;ExitCode=$exit;Passed=$passed;Checks=@($parsed.checks.PSObject.Properties).Count;ReportSha256=(Get-FileHash -LiteralPath $report).Hash;CandidateSha256=$exeHash}
|
||||
[ordered]@{Test=$name;ExitCode=$exit;Passed=$passed;Checks=$checkCount;ReportSha256=(Get-FileHash -LiteralPath $report).Hash;CandidateSha256=$exeHash}
|
||||
})
|
||||
if((Get-FileHash -LiteralPath $exe).Hash -cne $exeHash){throw 'Candidate changed during offline tests'}
|
||||
$offline=[ordered]@{Kind='exact-build-offline-executable';Version=$version;CandidateSha256=$exeHash;Passed=$true;Count=($results.Checks | Measure-Object -Sum).Sum;Tests=$results;NetworkActions=@();Installed=$false;Published=$false;ProductionAccepted=$false}
|
||||
@@ -101,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 -eq '0.3.0'){
|
||||
if($FormalChannel -and $FormalVersion -in @('0.3.0','0.4.0')){
|
||||
$previewExit=Run-Offline $exe '--render-preview'
|
||||
$previewReport=Join-Path $candidate 'dashboard-ui-self-test.json'
|
||||
$preview=Get-Content -LiteralPath $previewReport -Raw | ConvertFrom-Json
|
||||
@@ -123,6 +136,20 @@ $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'){
|
||||
$payloadTest=Join-Path $root 'payload-self-test'
|
||||
Copy-Item -LiteralPath $payload -Destination $payloadTest -Recurse
|
||||
$payloadExe=Join-Path $payloadTest 'VPNPlus.exe'
|
||||
$simpleResults=@(foreach($name in @('self-test','hot-routing-self-test')){
|
||||
$exit=Run-Offline $payloadExe ('--'+$name)
|
||||
if($exit -ne 0){throw ('Offline executable check failed: '+$name)}
|
||||
[ordered]@{Test=$name;ExitCode=$exit;Passed=$true;CandidateSha256=$exeHash}
|
||||
})
|
||||
Save (Join-Path $evidence 'simple-offline-validation.json') ([ordered]@{
|
||||
Kind='exact-build-simple-offline-payload';Version=$version;CandidateSha256=$exeHash;
|
||||
Passed=$true;Tests=$simpleResults;NetworkActions=@();Installed=$false;Published=$false
|
||||
})
|
||||
}
|
||||
$filename="UCVL-Zonghengjia-$version-win-x64-setup.exe";$setup=Join-Path $package $filename
|
||||
[string[]]$versionArgs=if($FormalChannel){@('/DPRODUCT_REVISION=0')}else{@("/DPRODUCT_BUILD_SUFFIX=-tailnet.preview.$PreviewRevision","/DPRODUCT_REVISION=$PreviewRevision")}
|
||||
& $nsis '/V2' "/DPRODUCT_VERSION=$baseVersion" @versionArgs "/DAPP_SOURCE_DIR=$payload" "/DINSTALLER_OUTPUT=$setup" '/INPUTCHARSET' 'UTF8' (Join-Path $source 'installer/VPNPlus.nsi')
|
||||
@@ -136,10 +163,16 @@ $actual=@(Get-ChildItem -LiteralPath $payload -Recurse -File | ForEach-Object {[
|
||||
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'){
|
||||
@('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{
|
||||
@('live same-node Tailscale proxy','TUN and Tailscale UDP/DERP underlay coexistence','live failover/network handover','current node firewall','production UAC/upgrade/complete guardian rollback','authenticated sustained session','physical multi-monitor DPI, drag and snap')
|
||||
}
|
||||
$summary=[ordered]@{Kind='windows-build-package-only';RequestedChannel=$(if($FormalChannel){'formal-nonmandatory'}else{'preview'});Version=$version;CandidateSha256=$exeHash;PackageSha256=$setupHash;PackageBytes=(Get-Item -LiteralPath $setup).Length;
|
||||
PayloadFiles=13;SourceFiles=$snapshot.Count;OfflineChecks=$offline.Count;FileVersion=$exeInfo.FileVersion;ProductVersion=$exeInfo.ProductVersion;PackageProductVersion=$packageInfo.ProductVersion;
|
||||
Signatures=$signatures;Installed=$false;Published=$false;ProductionAccepted=$false;CandidateDirectory=$root;SourceManifestSha256=(Get-FileHash -LiteralPath (Join-Path $evidence 'source-manifest.json')).Hash;
|
||||
Build=[ordered]@{DotnetSha256=(Get-FileHash -LiteralPath $dotnet).Hash;NsisSha256=(Get-FileHash -LiteralPath $nsis).Hash;Arguments=$buildArgs};
|
||||
NotAccepted=@('live same-node Tailscale proxy','TUN and Tailscale UDP/DERP underlay coexistence','live failover/network handover','current node firewall','production UAC/upgrade/complete guardian rollback','authenticated sustained session','physical multi-monitor DPI, drag and snap')}
|
||||
NotAccepted=$notAccepted}
|
||||
Save (Join-Path $root 'frozen-candidate.json') $summary
|
||||
$summary | ConvertTo-Json -Depth 8
|
||||
|
||||
Reference in New Issue
Block a user