-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(cli): warn about bundling updater target without appropriate targets, closes #7181 #7189
Conversation
On Linux and macOS we're actually triggering the AppImage/app bundling. We just need to do the same on Windows.
|
I knew I saw this code somewhere lol. Anyways, while this works fine for Linux and macOS, it is not the same case for Windows since there is two updater targets and not just one, so should we build both targets? doesn't sound intuitive to me, instead we should be disabling building |
What if we assume NSIS in this case? I think that should be our focus going forward, and maybe we can even drop WiX on v2 (probably move it out of the monorepo so custom users have time to migrate). |
We can assume NSIS as default for now but it is not future-proof, if we decided to add another bundler target like |
Hmm ok. Safer to go with this idea then. |
PackageType::Updater => { | ||
if !package_types.iter().any(|p| { | ||
matches!( | ||
p, | ||
PackageType::AppImage | ||
| PackageType::MacOsBundle | ||
| PackageType::Nsis | ||
| PackageType::WindowsMsi | ||
) | ||
}) { | ||
warn!("The updater bundle target exists but couldn't find any updater-enabled target, so the updater artifacts won't be generated. Please add one of these targets as well: app, appimage, msi, nsis"); | ||
continue; | ||
} | ||
updater_bundle::bundle_project(&settings, &bundles)? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have just found out that package_types
is never updated when a macOS DMG bundle is generated (see lines 77-85). Therefore, the updater bundle will not be generated if the macOS .app bundle is not explicitly set in package_types
, even though the DMG bundle implies the generation of an app bundle and thus package_types
does not need to explicitly contain a macOS .app bundle.
I'd suggest adding a | PackageType::Dmg
branch to the matches!
macro here to better handle this edge case.
What kind of change does this PR introduce?
Does this PR introduce a breaking change?
Checklist
fix: remove a typo, closes #___, #___
)Other information