fix(release): ship scanner/ + automation/ in the portable ZIP#38
Merged
Conversation
PR #36 trimmed the ZIP to just WRAITH.exe + README.md on the assumption that the csproj Content includes embedded the Python scanner and the PowerShell automation scripts inside the single-file binary. They don't. CopyToOutputDirectory drops those trees ALONGSIDE the EXE in ./publish; the single-file bundler only ingests managed assemblies and native libs. Result: portable ZIP users extracted, double-clicked WRAITH.exe, hit Scan, and every Python-backed scan failed with "Python scanner not found at <extract-dir>\scanner\scanner.py" because BootstrapService .ResolveBaseDir() joins "scanner" to the EXE dir and the ZIP had none. Stage step now copies ./publish/scanner and ./publish/automation into ./release before the Compress-Archive call, sourcing from the publish output so the csproj's existing Exclude pattern (test_*.py, __pycache__, *.pyc) automatically carries through — no duplicate filter to drift. Header comment + ZIP inventory block updated to match. Kept out (PR #36 intent preserved): START.bat, quick-scan.ps1, wraith.env.json template, LICENSE, repo CI/test files. The portable ZIP is now exactly the runtime payload — nothing more, nothing less. Velopack installer path was never broken by PR #36 (it consumes ./publish-velopack which still includes the directories via the same csproj rule), so this fix is portable-ZIP-only.
There was a problem hiding this comment.
Pull request overview
Updates the portable release ZIP packaging so runtime-required scanner/ (Python) and automation/ (PowerShell) directories are shipped alongside WRAITH.exe, matching how the app resolves paths at runtime and preventing broken “portable ZIP” executions.
Changes:
- Expands the documented ZIP inventory in
.github/workflows/deploy.ymlto includescanner/andautomation/. - Updates the “Stage release bundle” step to copy
./publish/scannerand./publish/automationinto./releaseprior toCompress-Archive, sourcing from publish output so the.csprojexcludes carry through.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+331
to
+335
| # Pull from ./publish so the same Exclude pattern that keeps | ||
| # test_*.py and __pycache__ out of csproj output keeps them out | ||
| # of the ZIP too — no duplicate filter to drift. | ||
| if (Test-Path ./publish/scanner) { Copy-Item -Recurse ./publish/scanner ./release/scanner } | ||
| if (Test-Path ./publish/automation) { Copy-Item -Recurse ./publish/automation ./release/automation } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
FARTS! PR #36 trimmed the ZIP to just WRAITH.exe + README.md on the assumption that the csproj Content includes embedded the Python scanner and the PowerShell automation scripts inside the single-file binary. They don't. CopyToOutputDirectory drops those trees ALONGSIDE the EXE in ./publish; the single-file bundler only ingests managed assemblies and native libs.
Result: portable ZIP users extracted, double-clicked WRAITH.exe, hit Scan, and every Python-backed scan failed with "Python scanner not found at \scanner\scanner.py" because BootstrapService .ResolveBaseDir() joins "scanner" to the EXE dir and the ZIP had none.
Stage step now copies ./publish/scanner and ./publish/automation into ./release before the Compress-Archive call, sourcing from the publish output so the csproj's existing Exclude pattern (test_*.py, pycache, *.pyc) automatically carries through — no duplicate filter to drift.
Header comment + ZIP inventory block updated to match.
Kept out (PR #36 intent preserved): START.bat, quick-scan.ps1, wraith.env.json template, LICENSE, repo CI/test files. The portable ZIP is now exactly the runtime payload — nothing more, nothing less.
Velopack installer path was never broken by PR #36 (it consumes ./publish-velopack which still includes the directories via the same csproj rule), so this fix is portable-ZIP-only.