mirror of https://github.com/tauri-apps/tauri
fix(bundler) bundle deb and appimage simultaneously correctly (#563)
This commit is contained in:
parent
db7d10308f
commit
b7934c7e41
|
@ -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)?,
|
||||
|
|
|
@ -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])
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue