Skip to content

Commit 53f8086

Browse files
authored
feat(bundler): add option to disable CI for just the dmg bundler (#11799)
1 parent 9f0d902 commit 53f8086

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

.changes/bundler-skip-ci.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
tauri-bundler: 'patch:enhance'
3+
---
4+
5+
The bundler now reads the `TAURI_BUNDLER_DMG_IGNORE_CI` env var to decide whether to check for `CI: true` when building DMG files.

crates/tauri-bundler/src/bundle/macos/dmg/mod.rs

+6-3
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,12 @@ pub fn bundle_project(settings: &Settings, bundles: &[Bundle]) -> crate::Result<
174174

175175
// Issue #592 - Building MacOS dmg files on CI
176176
// https://github.com/tauri-apps/tauri/issues/592
177-
if let Some(value) = env::var_os("CI") {
178-
if value == "true" {
179-
bundle_dmg_cmd.arg("--skip-jenkins");
177+
if env::var_os("TAURI_BUNDLER_DMG_IGNORE_CI").unwrap_or_default() != "true" {
178+
if let Some(value) = env::var_os("CI") {
179+
if value == "true" {
180+
bundle_dmg_cmd.arg("--skip-jenkins");
181+
} else {
182+
}
180183
}
181184
}
182185

crates/tauri-cli/ENVIRONMENT_VARIABLES.md

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ These environment variables are inputs to the CLI which may have an equivalent C
1717
- `TAURI_BUNDLER_WIX_FIPS_COMPLIANT` — Specify the bundler's WiX `FipsCompliant` option.
1818
- `TAURI_BUNDLER_TOOLS_GITHUB_MIRROR` - Specify a GitHub mirror to download files and tools used by tauri bundler.
1919
- `TAURI_BUNDLER_TOOLS_GITHUB_MIRROR_TEMPLATE` - Specify a GitHub mirror template to download files and tools used by tauri bundler, for example: `https://mirror.example.com/<owner>/<repo>/releases/download/<version>/<asset>`.
20+
- `TAURI_BUNDLER_DMG_IGNORE_CI` - Disable the check for `CI: true` in the `.dmg` bundler.
2021
- `TAURI_SKIP_SIDECAR_SIGNATURE_CHECK` - Skip signing sidecars.
2122
- `TAURI_SIGNING_PRIVATE_KEY` — Private key used to sign your app bundles, can be either a string or a path to the file.
2223
- `TAURI_SIGNING_PRIVATE_KEY_PASSWORD` — The signing private key password, see `TAURI_SIGNING_PRIVATE_KEY`.

0 commit comments

Comments
 (0)