From 1cb6ad16cb75ed724da6946bb56918f0fccea48e Mon Sep 17 00:00:00 2001 From: SuperCuber Date: Sun, 24 Aug 2025 21:00:17 +0300 Subject: [PATCH 1/3] Insert os variables --- src/handlebars_helpers.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/handlebars_helpers.rs b/src/handlebars_helpers.rs index 4477e1c..836019c 100644 --- a/src/handlebars_helpers.rs +++ b/src/handlebars_helpers.rs @@ -330,6 +330,13 @@ 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( From ce3f5633b346be5eeaa11ea8568430af1b6d7151 Mon Sep 17 00:00:00 2001 From: SuperCuber Date: Sun, 24 Aug 2025 21:02:20 +0300 Subject: [PATCH 2/3] Fmt --- src/handlebars_helpers.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/handlebars_helpers.rs b/src/handlebars_helpers.rs index 836019c..2804943 100644 --- a/src/handlebars_helpers.rs +++ b/src/handlebars_helpers.rs @@ -333,7 +333,10 @@ fn add_dotter_variable( // New better way dotter.insert("unix".into(), Value::Boolean(cfg!(unix))); - dotter.insert("windows".into(), Value::Boolean(cfg!(target_os = "windows"))); + 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"))); From d7fb83031150ba1448df56a4119e6556b8cf0c16 Mon Sep 17 00:00:00 2001 From: "amit.gold" Date: Thu, 28 Aug 2025 22:45:41 +0200 Subject: [PATCH 3/3] Add watch tracing --- src/watch.rs | 3 +++ 1 file changed, 3 insertions(+) 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);