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