Skip to content

Commit b0f9477

Browse files
authored
feat(cli): add migrate command (#7008)
1 parent d1304ff commit b0f9477

File tree

8 files changed

+678
-4
lines changed

8 files changed

+678
-4
lines changed

.changes/migrate-cmd.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"cli.rs": patch
3+
"cli.js": patch
4+
---
5+
6+
Added `migrate` command.

tooling/cli/Cargo.lock

Lines changed: 50 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tooling/cli/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ duct = "0.13"
6161
toml_edit = "0.14"
6262
json-patch = "0.2"
6363
tauri-utils = { version = "2.0.0-alpha.5", path = "../../core/tauri-utils", features = [ "isolation", "schema", "config-json5", "config-toml" ] }
64+
tauri-utils-v1 = { version = "1", package = "tauri-utils", features = [ "isolation", "schema", "config-json5", "config-toml" ] }
6465
toml = "0.5"
6566
jsonschema = "0.16"
6667
handlebars = "4.3"

tooling/cli/src/interface/rust/manifest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ pub fn read_manifest(manifest_path: &Path) -> crate::Result<Document> {
9898
Ok(manifest)
9999
}
100100

101-
fn toml_array(features: &HashSet<String>) -> Array {
101+
pub fn toml_array(features: &HashSet<String>) -> Array {
102102
let mut f = Array::default();
103103
let mut features: Vec<String> = features.iter().map(|f| f.to_string()).collect();
104104
features.sort();

tooling/cli/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ mod icon;
1111
mod info;
1212
mod init;
1313
mod interface;
14+
mod migrate;
1415
mod mobile;
1516
mod plugin;
1617
mod signer;
@@ -96,6 +97,8 @@ enum Commands {
9697
Android(mobile::android::Cli),
9798
#[cfg(target_os = "macos")]
9899
Ios(mobile::ios::Cli),
100+
/// Migrate from v1 to v2
101+
Migrate,
99102
}
100103

101104
fn format_error<I: CommandFactory>(err: clap::Error) -> clap::Error {
@@ -198,6 +201,7 @@ where
198201
Commands::Android(c) => mobile::android::command(c, cli.verbose)?,
199202
#[cfg(target_os = "macos")]
200203
Commands::Ios(c) => mobile::ios::command(c, cli.verbose)?,
204+
Commands::Migrate => migrate::command()?,
201205
}
202206

203207
Ok(())

0 commit comments

Comments
 (0)