- 新增发布校验脚本(buildsh/lib/verify_release.py + release.sh),核对 tag/清单/资产 三者的 sha256 与体积,并复验清单签名;接入 ./build.sh release-verify 与 .gitea/workflows/release-verify.yml(手动触发) - GcLog 改为常驻 StreamWriter + 按天轮转 + 14 天/64MB 保留策略,避免高峰期反复 开关文件句柄;只清理本模块生成的 gc-*.log,不碰用户文件 - 修复 Applier 验签逻辑:无效签名永远拒绝,仅「未签名」在调用方不强制时放行 - 新增应用器测试(GC.Savedog.Tests):整目录替换、.GC/bin 合并、启动失败回滚、 路径穿越防护、验签;接入 pr-check.yml - GC.Tests 增加日志用例(写入/轮转/清理/用户文件保护) - 同步 PowerShell 打包脚本与 buildsh 一致:GCL 命名、单顶层目录、守护进程收进 .GC/bin、启动器与守护进程压缩单文件、不预置 .GC、prune/strip 对齐、签名 keyId 改为 gc-2026-12、新增 release-verify 与应用器测试任务
49 lines
2.0 KiB
PowerShell
49 lines
2.0 KiB
PowerShell
param(
|
|
[Parameter(Position = 0)]
|
|
[ValidateSet('build','check','models','stamp','pack-models','pack-launcher',
|
|
'release-verify','run','test','update-test','clean','doctor','dist')]
|
|
[string]$Task = 'build',
|
|
[string]$Version = ''
|
|
)
|
|
|
|
$ErrorActionPreference = 'Stop'
|
|
$script:BuildRoot = (Resolve-Path (Join-Path $PSScriptRoot '..')).Path
|
|
$script:AppProject = 'GC-BOOT/GC-BOOT.csproj'
|
|
$script:PreviewProject = 'model/_engine/PreviewGen/PreviewGen.csproj'
|
|
$script:StampProject = 'model/_engine/VersionStamp/VersionStamp.csproj'
|
|
$script:TestProject = 'GC/src/test/dotnet/GC.Tests/GC.Tests.csproj'
|
|
$script:Solution = 'GC.sln'
|
|
$env:AVALONIA_TELEMETRY_OPTOUT = '1'
|
|
|
|
Push-Location $script:BuildRoot
|
|
try {
|
|
$props = [xml](Get-Content 'Directory.Build.props' -Raw)
|
|
$versionNode = $props.SelectSingleNode('/Project/PropertyGroup/Version')
|
|
if (-not $Version) { $Version = $versionNode.InnerText }
|
|
if (-not $Version) { $Version = '1.0.0' }
|
|
$script:BuildVersion = $Version
|
|
|
|
# release-verify 的 -Version 是「要核对的 tag」,不是改版本号:绝不能改写清单
|
|
if ($PSBoundParameters.ContainsKey('Version') -and $Task -ne 'release-verify') {
|
|
if ($null -eq $versionNode) { throw 'Directory.Build.props 中找不到 Version 节点。' }
|
|
$versionNode.InnerText = $Version
|
|
$props.Save((Join-Path $script:BuildRoot 'Directory.Build.props'))
|
|
Write-Host "==> 版本号设为 $Version"
|
|
}
|
|
|
|
New-Item -ItemType Directory -Force -Path 'build/logs' | Out-Null
|
|
. (Join-Path $PSScriptRoot 'lib/Progress.ps1')
|
|
. (Join-Path $PSScriptRoot 'lib/Build-Funcs.ps1')
|
|
. (Join-Path $PSScriptRoot 'Build-Check.ps1')
|
|
. (Join-Path $PSScriptRoot 'Build-Tools.ps1')
|
|
|
|
switch ($Task) {
|
|
'build' { Invoke-FullBuild }
|
|
'check' { Invoke-BuildCheck }
|
|
'release-verify' { Invoke-ReleaseVerify -Tag $Version }
|
|
default { Invoke-BuildTool $Task }
|
|
}
|
|
}
|
|
finally {
|
|
Pop-Location
|
|
} |