mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-07-16 16:47:21 +02:00
windows tests
This commit is contained in:
@@ -56,20 +56,19 @@ fn build_app(cwd: &Path, config: &Config, bundle_updater: bool, targets: Vec<Bun
|
|||||||
.env("TAURI_SIGNING_PRIVATE_KEY_PASSWORD", "")
|
.env("TAURI_SIGNING_PRIVATE_KEY_PASSWORD", "")
|
||||||
.current_dir(cwd);
|
.current_dir(cwd);
|
||||||
|
|
||||||
|
let cmd_args = targets.into_iter().map(|t| t.name()).collect::<Vec<&str>>();
|
||||||
command.args(["--bundles"]);
|
command.args(["--bundles"]);
|
||||||
#[cfg(target_os = "linux")]
|
#[cfg(target_os = "linux")]
|
||||||
command.args(targets.into_iter().map(|t| t.name()).collect::<Vec<&str>>());
|
command.args(cmd_args);
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
command.args([target.name()]);
|
command.args(cmd_args);
|
||||||
|
|
||||||
if bundle_updater {
|
if bundle_updater {
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
command.args(["msi", "nsis"]);
|
command.args(["msi", "nsis"]);
|
||||||
|
|
||||||
command.args(["updater"]);
|
|
||||||
} else {
|
} else {
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
command.args([target.name()]);
|
command.args(cmd_args);
|
||||||
}
|
}
|
||||||
let status = command
|
let status = command
|
||||||
.status()
|
.status()
|
||||||
@@ -202,24 +201,60 @@ fn bundle_path(root_dir: &Path, _version: &str, v1compatible: bool) -> PathBuf {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
fn bundle_paths(
|
fn test_cases(
|
||||||
root_dir: &Path,
|
root_dir: &Path,
|
||||||
version: &str,
|
version: &str,
|
||||||
v1compatible: bool,
|
target: String
|
||||||
) -> Vec<(BundleTarget, PathBuf)> {
|
) -> Vec<(BundleTarget, PathBuf, Option<String>, Vec<i32>)> {
|
||||||
vec![
|
vec![
|
||||||
(
|
(
|
||||||
BundleTarget::Nsis,
|
BundleTarget::Nsis,
|
||||||
root_dir.join(format!(
|
root_dir.join(format!(
|
||||||
"target/debug/bundle/nsis/app-updater_{version}_x64-setup.exe"
|
"target/debug/bundle/nsis/app-updater_{version}_x64-setup.exe"
|
||||||
)),
|
)),
|
||||||
|
Some(target.clone()),
|
||||||
|
vec![UPDATED_EXIT_CODE]
|
||||||
|
),
|
||||||
|
(
|
||||||
|
BundleTarget::Nsis,
|
||||||
|
root_dir.join(format!(
|
||||||
|
"target/debug/bundle/nsis/app-updater_{version}_x64-setup.exe"
|
||||||
|
)),
|
||||||
|
Some(format!("{target}-{}", BundleTarget::Nsis.name())),
|
||||||
|
vec![UPDATED_EXIT_CODE]
|
||||||
|
),
|
||||||
|
(
|
||||||
|
BundleTarget::Nsis,
|
||||||
|
root_dir.join(format!(
|
||||||
|
"target/debug/bundle/nsis/app-updater_{version}_x64-setup.exe"
|
||||||
|
)),
|
||||||
|
None,
|
||||||
|
vec![ERROR_EXIT_CODE]
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
BundleTarget::Msi,
|
BundleTarget::Msi,
|
||||||
root_dir.join(format!(
|
root_dir.join(format!(
|
||||||
"target/debug/bundle/msi/app-updater_{version}_x64_en-US.msi"
|
"target/debug/bundle/msi/app-updater_{version}_x64_en-US.msi"
|
||||||
)),
|
)),
|
||||||
|
Some(target.clone()),
|
||||||
|
vec![UPDATED_EXIT_CODE]
|
||||||
),
|
),
|
||||||
|
(
|
||||||
|
BundleTarget::Msi,
|
||||||
|
root_dir.join(format!(
|
||||||
|
"target/debug/bundle/msi/app-updater_{version}_x64_en-US.msi"
|
||||||
|
)),
|
||||||
|
Some(format!("{target}-{}", BundleTarget::Msi.name())),
|
||||||
|
vec![UPDATED_EXIT_CODE]
|
||||||
|
),
|
||||||
|
(
|
||||||
|
BundleTarget::Msi,
|
||||||
|
root_dir.join(format!(
|
||||||
|
"target/debug/bundle/msi/app-updater_{version}_x64_en-US.msi"
|
||||||
|
)),
|
||||||
|
None,
|
||||||
|
vec![ERROR_EXIT_CODE]
|
||||||
|
)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user