feat(bundler): always bundle deb before appimage, fixes #1026 (#1156)

The appimage script depends on output from the deb bundle
This commit is contained in:
Noah Klayman
2021-01-26 18:03:22 -08:00
committed by GitHub
parent 01f45a999d
commit f1afb5c366

View File

@@ -25,7 +25,14 @@ use std::path::PathBuf;
/// Returns the list of paths where the bundles can be found.
pub fn bundle_project(settings: Settings) -> crate::Result<Vec<PathBuf>> {
let mut paths = Vec::new();
let package_types = settings.package_types()?;
let mut package_types = settings.package_types()?;
// The AppImage bundle script requires that the Deb bundle be run first
if package_types.contains(&PackageType::AppImage) {
if let Some(deb_pos) = package_types.iter().position(|&p| p == PackageType::Deb) {
package_types.remove(deb_pos);
}
package_types.insert(0, PackageType::Deb);
}
for package_type in &package_types {
let mut bundle_paths = match package_type {
PackageType::OsxBundle => {