- 新增 Obfuscar 混淆发布脚本、发布测试与产物隐私检查 - 调整 VS Code 发布任务和宿主发布配置,统一走混淆流程 - 为 debug 页面内嵌静态接口说明,并补充对应集成测试 - 更新 README 与设计计划文档,记录跨平台发布约束
36 lines
965 B
PowerShell
36 lines
965 B
PowerShell
<#
|
|
.SYNOPSIS
|
|
验证混淆发布包不会泄露 Flyshot 源码文档或调试符号。
|
|
|
|
.PARAMETER PublishDirectory
|
|
需要检查的框架依赖混淆发布目录。
|
|
#>
|
|
|
|
[CmdletBinding()]
|
|
param(
|
|
[string]$PublishDirectory = (Join-Path $PSScriptRoot '..\..\outputs\obfuscated\framework-dependent')
|
|
)
|
|
|
|
$ErrorActionPreference = 'Stop'
|
|
$absolutePublishDirectory = [System.IO.Path]::GetFullPath($PublishDirectory)
|
|
|
|
if (-not (Test-Path -LiteralPath $absolutePublishDirectory -PathType Container))
|
|
{
|
|
throw "混淆发布目录不存在:$absolutePublishDirectory"
|
|
}
|
|
|
|
$sensitiveFiles = @(
|
|
Get-ChildItem -LiteralPath $absolutePublishDirectory -File |
|
|
Where-Object {
|
|
$_.Name -like 'Flyshot*.xml' -or
|
|
$_.Name -like 'Flyshot*.pdb'
|
|
}
|
|
)
|
|
|
|
if ($sensitiveFiles.Count -gt 0)
|
|
{
|
|
throw "混淆发布包仍包含源码文档或调试符号:$($sensitiveFiles.Name -join ', ')"
|
|
}
|
|
|
|
Write-Host 'Test-PublishedArtifactPrivacy.ps1: PASS'
|