fix(updater): ignore installer assets in default matcher#5774
Conversation
WalkthroughThe GitHub default asset matcher now ignores release assets whose filenames contain “installer.” Tests add a Windows installer artifact and verify that no primary asset is selected for Windows/amd64. ChangesGitHub Installer Asset Filtering
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
v3/pkg/updater/providers/github/github_test.go (1)
301-301: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winExercise the original installer-versus-executable collision.
The current fixture proves that an installer-only Windows release returns
-1, but it does not verify that a real executable is selected when the installer appears first. Addapp-windows-amd64.exeafter the installer and expect its index to ensure the original regression is covered.Suggested test adjustment
{Name: "app-darwin-arm64.dmg.sig"}, {Name: "app-windows-amd64-installer.exe"}, + {Name: "app-windows-amd64.exe"}, } ... - {"windows", "amd64", -1}, // windows installer skipped by matcher + {"windows", "amd64", 7}, // installer skipped; application selectedAlso applies to: 312-312
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@v3/pkg/updater/providers/github/github_test.go` at line 301, Update the GitHub provider test fixture around the Windows asset list to add app-windows-amd64.exe after app-windows-amd64-installer.exe, and change the expected result to that executable’s index. Preserve the installer-only case expecting -1 so both behaviors are covered.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@v3/pkg/updater/providers/github/github_test.go`:
- Line 301: Update the GitHub provider test fixture around the Windows asset
list to add app-windows-amd64.exe after app-windows-amd64-installer.exe, and
change the expected result to that executable’s index. Preserve the
installer-only case expecting -1 so both behaviors are covered.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: acf8461c-b818-461b-bf0f-56ede598e7c5
📒 Files selected for processing (2)
v3/pkg/updater/providers/github/github.gov3/pkg/updater/providers/github/github_test.go
Description
Binary created by wails3 package on windows (nsis) contains installer suffix. And with updater setup, the app pulls installer binary instead of actual executable. This causes the installer binary to replace actual application and you can't install the app in the same place anymore.
Fixes # (#5773 )
Type of change
Please select the option that is relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration using
wails doctor.If you checked Linux, please specify the distro and version.
Test Configuration
Summary by CodeRabbit