feat(cli): expose iOS project path and app name as env vars (#7446)

This commit is contained in:
Lucas Fernandes Nogueira 2023-07-18 06:19:01 -07:00 committed by GitHub
parent 753900dd6e
commit c7dacca466
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View File

@ -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.

View File

@ -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;
@ -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)
}