Skip to content

Commit a944b9b

Browse files
authored
feat(cli): add --github-workflows (#11118)
closes #11117
1 parent 06718b4 commit a944b9b

File tree

4 files changed

+22
-0
lines changed

4 files changed

+22
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"tauri-cli": "patch:breaking"
3+
"@tauri-apps/cli": "patch:breaking"
4+
---
5+
6+
`tauri plugin init/new` will no longer generate a `.github` directory with workflows by default, instead use the new `--github-workflows` flag.
7+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"tauri-cli": "patch:feat"
3+
"@tauri-apps/cli": "patch:feat"
4+
---
5+
6+
Add `--github-workflows` flag for `tauri plugin new/init`.
7+

crates/tauri-cli/src/plugin/init.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ pub struct Options {
5656
#[clap(long)]
5757
#[clap(default_value_t = PluginIosFramework::default())]
5858
pub(crate) ios_framework: PluginIosFramework,
59+
/// Generate github workflows
60+
#[clap(long)]
61+
pub(crate) github_workflows: bool,
5962

6063
/// Initializes a Tauri core plugin (internal usage)
6164
#[clap(long, hide(true))]
@@ -193,6 +196,7 @@ pub fn command(mut options: Options) -> Result<()> {
193196
return Ok(None);
194197
}
195198
}
199+
".github" if !options.github_workflows => return Ok(None),
196200
"android" => {
197201
if options.android || options.mobile {
198202
return generate_android_out_file(

crates/tauri-cli/src/plugin/new.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ pub struct Options {
3737
#[clap(long)]
3838
#[clap(default_value_t = PluginIosFramework::default())]
3939
pub(crate) ios_framework: PluginIosFramework,
40+
/// Generate github workflows
41+
#[clap(long)]
42+
github_workflows: bool,
4043

4144
/// Initializes a Tauri core plugin (internal usage)
4245
#[clap(long, hide(true))]
@@ -58,6 +61,7 @@ impl From<Options> for super::init::Options {
5861
ios: o.ios,
5962
mobile: o.mobile,
6063
ios_framework: o.ios_framework,
64+
github_workflows: o.github_workflows,
6165

6266
tauri: o.tauri,
6367
tauri_path: o.tauri_path,

0 commit comments

Comments
 (0)