-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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(bundler/macos): clean up .app bundle if only .dmg is enabled #7081 #7116
Conversation
Thanks for contributing! ❤️ 2 things:
|
Only in the platform::xx::bundle_project method can get tmp files. pub struct BuildBundle {
bundles: Vec<PathBuf>,
trashes: Vec<PathBuf>,
}
// pub fn bundle_project(settings: &Settings) -> crate::Result<Vec<PathBuf>>
pub fn bundle_project(settings: &Settings) -> crate::Result<BuildBundle> {
...
} Then in bundle::bundle_project like let trashes = vec![]
for package_type in &package_types {
let bundle = match package_type {
#[cfg(target_os = "macos")]
PackageType::MacOsBundle => macos::app::bundle_project(&settings)?,
#[cfg(target_os = "macos")]
PackageType::IosBundle => macos::ios::bundle_project(&settings)?,
// dmg is dependant of MacOsBundle, we send our bundles to prevent rebuilding
...
_ => {
warn!("ignoring {:?}", package_type);
continue;
}
};
trashes.extend_from_slice(&bundle.trashes)
}
// clean up trashes after all bundle is build. @FabianLars If it's suitable, I will implement it 😃 |
Changing function signatures is a bit tricky because it's technically a breaking chance the the bundler is also released as a normal crate 🤔 Does my idea not work? To be clear, what i meant is to add something like this right above the if !bundles
.iter()
.filter(|bundle| bundle.package_type == PackageType::Updater) {
app_bundle_paths.clear();
} |
emm... |
Just in case: It's missing a changefile |
Totally missed it, nice catch :) |
What kind of change does this PR introduce?
Does this PR introduce a breaking change?
Checklist
fix: remove a typo, closes #___, #___
)Other information
fix #7081. clean up .app bundle if only .dmg is enabled