fix(bundler) bundle deb and appimage simultaneously correctly (#563)

This commit is contained in:
Lucas Fernandes Nogueira 2020-04-08 23:46:26 -03:00 committed by GitHub
parent db7d10308f
commit b7934c7e41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 13 deletions

View File

@ -35,17 +35,7 @@ pub fn bundle_project(settings: Settings) -> crate::Result<Vec<PathBuf>> {
PackageType::IosBundle => ios_bundle::bundle_project(&settings)?,
#[cfg(target_os = "windows")]
PackageType::WindowsMsi => msi_bundle::bundle_project(&settings)?,
PackageType::Deb => {
if package_types
.clone()
.iter()
.any(|&t| t == PackageType::AppImage)
{
vec![]
} else {
deb_bundle::bundle_project(&settings)?
}
}
PackageType::Deb => deb_bundle::bundle_project(&settings)?,
PackageType::Rpm => rpm_bundle::bundle_project(&settings)?,
PackageType::AppImage => appimage_bundle::bundle_project(&settings)?,
PackageType::Dmg => dmg_bundle::bundle_project(&settings)?,

View File

@ -38,7 +38,7 @@ pub fn bundle_project(settings: &Settings) -> crate::Result<Vec<PathBuf>> {
settings.version_string(),
arch
);
let base_dir = settings.project_out_directory().join("bundle/deb");
let base_dir = settings.project_out_directory().join("bundle/appimage_deb");
let package_dir = base_dir.join(&package_base_name);
// generate deb_folder structure
@ -90,5 +90,7 @@ pub fn bundle_project(settings: &Settings) -> crate::Result<Vec<PathBuf>> {
.spawn()
.expect("Failed to execute shell script");
Ok(vec![package_dir, appimage_path])
remove_dir_all(&package_dir)?;
Ok(vec![appimage_path])
}