From e25e840930b1e9c86ef32dc7153eee98ca6c8364 Mon Sep 17 00:00:00 2001 From: xuans Date: Sun, 20 Sep 2026 20:54:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8F=91=E5=B8=83=E8=B7=AF?= =?UTF-8?q?=E5=BE=84=E6=A3=80=E6=9F=A5=E7=9A=84=E7=A9=BA=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E5=8F=98=E9=87=8F=E5=8F=82=E6=95=B0=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/internal/releasearchive/verify_test.go | 2 ++ build/build-release.ps1 | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/internal/releasearchive/verify_test.go b/backend/internal/releasearchive/verify_test.go index 7ff8ac3..6087417 100644 --- a/backend/internal/releasearchive/verify_test.go +++ b/backend/internal/releasearchive/verify_test.go @@ -143,6 +143,8 @@ func TestReleaseScriptUsesPathChecksAndIncludesLinuxHelper(t *testing.T) { } for _, required := range []string{ "go build -trimpath", "wails build -trimpath", "Test-ReleasePaths -Source $targetDirectory", + `$checkedPaths = @($forbiddenPaths | Where-Object { -not [string]::IsNullOrWhiteSpace($_) } | Select-Object -Unique)`, + `-ForbiddenPaths $checkedPaths`, `-Package "./cmd/scert-nginx"`, `$binaries += "scert-nginx"`, `-Executable (@("install-linux.sh") + $binaries)`, `trimpath = $true`, `local_path_check = "passed"`, diff --git a/build/build-release.ps1 b/build/build-release.ps1 index 6e516aa..1d74e20 100644 --- a/build/build-release.ps1 +++ b/build/build-release.ps1 @@ -425,7 +425,8 @@ try { } } - Test-ReleasePaths -Source $targetDirectory -Binaries $binaries -ForbiddenPaths $forbiddenPaths + $checkedPaths = @($forbiddenPaths | Where-Object { -not [string]::IsNullOrWhiteSpace($_) } | Select-Object -Unique) + Test-ReleasePaths -Source $targetDirectory -Binaries $binaries -ForbiddenPaths $checkedPaths Write-TargetChecksums -TargetDirectory $targetDirectory | Out-Null foreach ($file in (Get-ChildItem -LiteralPath $targetDirectory -Recurse -File | Sort-Object FullName)) { $hash = Get-FileHash -LiteralPath $file.FullName -Algorithm SHA256