Skip to content

Commit

Permalink
feat(cli): expose iOS project path and app name as env vars (#7446)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog committed Jul 18, 2023
1 parent 753900d commit c7dacca
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changes/cli-ios-metadata-env-var.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"tauri-cli": patch:feat
"@tauri-apps/cli": patch:feat
---

Expose the `TAURI_IOS_PROJECT_PATH` and `TAURI_IOS_APP_NAME` environment variables when using `ios` commands.
5 changes: 4 additions & 1 deletion tooling/cli/src/mobile/ios.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use super::{
};
use crate::{helpers::config::Config as TauriConfig, Result};

use std::{process::exit, thread::sleep, time::Duration};
use std::{env::set_var, process::exit, thread::sleep, time::Duration};

mod build;
mod dev;
Expand Down Expand Up @@ -140,6 +140,9 @@ pub fn get_config(
macos: Default::default(),
};

set_var("TAURI_IOS_PROJECT_PATH", config.project_dir());
set_var("TAURI_IOS_APP_NAME", config.app().name());

(config, metadata)
}

Expand Down

0 comments on commit c7dacca

Please sign in to comment.