summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorHenrique Alves <henriquelalves@gmail.com>2022-08-11 23:03:46 -0300
committerHenrique Alves <henriquelalves@gmail.com>2022-08-11 23:03:46 -0300
commit0f75eec7337012dacfa627952fe3785cf0589151 (patch)
tree31ef2bd485d68b638e15cc94777c9177cff8b52b /src/main.rs
parentd374847a746ec3877801881455d6198b76eb1847 (diff)
downloadglam-0f75eec7337012dacfa627952fe3785cf0589151.tar.gz
glam-0f75eec7337012dacfa627952fe3785cf0589151.tar.bz2
glam-0f75eec7337012dacfa627952fe3785cf0589151.zip
Add package creation via existing addon
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs
index 8584779..cb399d9 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -58,11 +58,13 @@ enum Commands {
package_name: String,
},
- // TODO: Add "push" flag to automate applying changes, commiting them and pushing
/// Apply changes to a package
Apply {
/// Name of the package to apply changes to
package_name: String,
+ /// Create new package from the specified addon folder (will create a git repo)
+ #[clap(short, long, required = false, default_value = "")]
+ create_from_addon: String,
}
}
@@ -111,11 +113,11 @@ fn main() {
commands::remove_package(&root, &package_name, cli.verbose);
},
- Commands::Apply {package_name} => {
+ Commands::Apply {package_name, create_from_addon} => {
let root = commands::search_project_root();
commands::check_ignores(&root);
commands::initialize_glam_files(&root);
- commands::apply_changes(&root, &package_name, cli.verbose);
+ commands::apply_changes(&root, &package_name, &create_from_addon, cli.verbose);
},
}
}