diff --git a/src/handlebars_helpers.rs b/src/handlebars_helpers.rs index 4477e1c..2804943 100644 --- a/src/handlebars_helpers.rs +++ b/src/handlebars_helpers.rs @@ -330,6 +330,16 @@ fn add_dotter_variable( "os".into(), (if cfg!(windows) { "windows" } else { "unix" }).into(), ); + + // New better way + dotter.insert("unix".into(), Value::Boolean(cfg!(unix))); + dotter.insert( + "windows".into(), + Value::Boolean(cfg!(target_os = "windows")), + ); + dotter.insert("linux".into(), Value::Boolean(cfg!(target_os = "linux"))); + dotter.insert("macos".into(), Value::Boolean(cfg!(target_os = "macos"))); + dotter.insert( "current_dir".into(), Value::String( diff --git a/src/watch.rs b/src/watch.rs index e6132b9..6f16df4 100644 --- a/src/watch.rs +++ b/src/watch.rs @@ -56,6 +56,9 @@ pub(crate) async fn watch(opt: Options) -> Result<()> { return action; } + debug!("Changes detected in watched files."); + trace!("Changed files: {:#?}", action.paths().collect::>()); + println!("[Dotter] Deploying..."); if let Err(e) = deploy::deploy(&opt) { display_error(e);