Skip to content

Commit

Permalink
feat(bundler): add option to disable CI for just the dmg bundler (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianLars authored Nov 28, 2024
1 parent 9f0d902 commit 53f8086
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changes/bundler-skip-ci.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
tauri-bundler: 'patch:enhance'
---

The bundler now reads the `TAURI_BUNDLER_DMG_IGNORE_CI` env var to decide whether to check for `CI: true` when building DMG files.
9 changes: 6 additions & 3 deletions crates/tauri-bundler/src/bundle/macos/dmg/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,12 @@ pub fn bundle_project(settings: &Settings, bundles: &[Bundle]) -> crate::Result<

// Issue #592 - Building MacOS dmg files on CI
// https://github.com/tauri-apps/tauri/issues/592
if let Some(value) = env::var_os("CI") {
if value == "true" {
bundle_dmg_cmd.arg("--skip-jenkins");
if env::var_os("TAURI_BUNDLER_DMG_IGNORE_CI").unwrap_or_default() != "true" {
if let Some(value) = env::var_os("CI") {
if value == "true" {
bundle_dmg_cmd.arg("--skip-jenkins");
} else {
}
}
}

Expand Down
1 change: 1 addition & 0 deletions crates/tauri-cli/ENVIRONMENT_VARIABLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ These environment variables are inputs to the CLI which may have an equivalent C
- `TAURI_BUNDLER_WIX_FIPS_COMPLIANT` — Specify the bundler's WiX `FipsCompliant` option.
- `TAURI_BUNDLER_TOOLS_GITHUB_MIRROR` - Specify a GitHub mirror to download files and tools used by tauri bundler.
- `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>`.
- `TAURI_BUNDLER_DMG_IGNORE_CI` - Disable the check for `CI: true` in the `.dmg` bundler.
- `TAURI_SKIP_SIDECAR_SIGNATURE_CHECK` - Skip signing sidecars.
- `TAURI_SIGNING_PRIVATE_KEY` — Private key used to sign your app bundles, can be either a string or a path to the file.
- `TAURI_SIGNING_PRIVATE_KEY_PASSWORD` — The signing private key password, see `TAURI_SIGNING_PRIVATE_KEY`.
Expand Down

0 comments on commit 53f8086

Please sign in to comment.