From 03bc1a79f65173ca5bfd0e103c305529f9e9b645 Mon Sep 17 00:00:00 2001 From: Scott Mabin Date: Thu, 11 Jan 2024 13:48:39 +0000 Subject: [PATCH] Add back rustfmt, with catch to print error if it fails --- .github/verify.sh | 2 ++ post-script.rhai | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/verify.sh b/.github/verify.sh index ad015e5..0d15e4c 100644 --- a/.github/verify.sh +++ b/.github/verify.sh @@ -22,11 +22,13 @@ perform_checks() { # Generate templates cargo generate \ + -a \ --path $template_path --name=test-complex --silent --vcs=none \ -d advanced=true -d ci=false -d devcontainer=false -d wokwi=false \ -d alloc=true -d wifi=true -d mcu=$1 cargo generate \ + -a \ --path $template_path --name=test-simple --silent --vcs=none \ -d advanced=false -d mcu=$1 diff --git a/post-script.rhai b/post-script.rhai index 65e91d6..d9fbe96 100644 --- a/post-script.rhai +++ b/post-script.rhai @@ -1,7 +1,14 @@ if variable::get("wifi"){ - print("\nFor more information and examples of esp-wifi showcasing Wifi,BLE and ESP-NOW, see https://github.com/esp-rs/esp-wifi/blob/main/examples.md\n"); + print("\nFor more information and examples of esp-wifi showcasing Wifi,BLE and ESP-NOW, see https://github.com/esp-rs/esp-wifi/blob/main/esp-wifi/docs/examples.md\n"); } if variable::get("ci") { file::rename(".github/rust_ci.yml", ".github/workflows/rust_ci.yml"); } + + +try { + system::command("cargo", ["fmt"]); +} catch { + print("Failed to run rustfmt, please ensure rustfmt is installed and in your PATH variable."); +} \ No newline at end of file