fix(bundler): Prevent CI to failed on macos
Read `CI` env variable and if equal to true we set the DMG builder in CI mode.
See
@@ -4,6 +4,7 @@ use crate::Settings;
use anyhow::Context;
+use std::env;
use std::fs::{self, write};
use std::path::PathBuf;
use std::process::{Command, Stdio};
@@ -91,6 +92,17 @@ pub fn bundle_project(settings: &Settings) -> crate::Result<Vec<PathBuf>> {
args.push(license_path);
}
+ // Issue #592 - Building MacOS dmg files on CI
+ // https://github.com/tauri-apps/tauri/issues/592
+ match env::var_os("CI") {
+ Some(value) => {
+ if value == "true" {
+ args.push("--skip-jenkins");
+ }
+ }
+ None => (),
+ }
+
// execute the bundle script
let status = Command::new(&bundle_script_path)
.current_dir(bundle_dir.clone())
