From ba8e9afc0b957e1a8e182b4d2fbd183432b1c304 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Tue, 18 Apr 2023 22:00:37 +0000 Subject: fix(cargo-make): example runner --- Makefile.toml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/Makefile.toml b/Makefile.toml index 06832aa..543059e 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -14,16 +14,18 @@ command = "cargo" toolchain = "nightly" [tasks.checkf] -script_runner = "@shell" script = ''' +#!@shell + cargo make fmt cargo make check tokio cargo make check async-std ''' [tasks.checkfc] -script_runner = "@shell" script = ''' +#!@shell + cargo make fmt cargo make check tokio cargo make check async-std @@ -61,5 +63,12 @@ command = "cargo" args = ["doc", "--open", "--no-deps"] [tasks.example] -command = "cargo" -args = ["run", "--example", "${@}", "--all-features"] +script = ''' +#!@duckscript + +if is_empty ${2} + exec cargo run --example ${1} --no-default-features --features logger,auto-deduce-mime,response-macros,tokio +else + exec cargo run --example ${1} --no-default-features --features logger,auto-deduce-mime,response-macros,${2} +end +''' -- cgit v1.2.3