diff --git a/src/config.rs b/src/config.rs index 018ecf5..6ce4396 100644 --- a/src/config.rs +++ b/src/config.rs @@ -6,7 +6,7 @@ use std::{ use ron::ser::PrettyConfig; use serde::{Deserialize, Serialize}; -use crate::utils::Apply; +use crate::utils::{log_success, Apply}; #[derive(Debug, Serialize, Deserialize)] pub struct Config { @@ -82,5 +82,11 @@ pub fn create(path: String) { } let name = absolute.file_name().unwrap(); let config = Config::new(name.to_str().unwrap().to_string()); - config.write(absolute); + config.write(absolute.clone()); + let path = absolute + .apply(|p| p.push(Config::CONFIG_FILE_NAME)) + .to_str() + .unwrap() + .to_string(); + log_success(&format!("created '{path}'")); } diff --git a/src/main.rs b/src/main.rs index 5822bea..ec5f54b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -58,8 +58,11 @@ pub enum Commands { command: String, }, - /// + /// Initializes a project directory configuration, useful for custom flags, includes and custop push messages init { path: String }, + + /// Pushes changes to the git server with a custom tag. + push, } fn append_includes(list: &mut Vec) { @@ -120,5 +123,9 @@ fn main() { } Commands::init { path } => config::create(path), + + Commands::push => { + todo!(); + } } }