From f7f872f7eaf203a9e0d8ba17df5cd9036658872e Mon Sep 17 00:00:00 2001 From: Roy Ivy III Date: Sun, 24 May 2020 13:08:18 -0500 Subject: [PATCH] maint/build ~ fix `cargo-make format` (Makefile.toml) --- Makefile.toml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/Makefile.toml b/Makefile.toml index ccbf861d3..195342b8a 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -161,11 +161,10 @@ alias = "build-examples" alias = "build-features" [tasks.format] -description = "## Format code files (with `cargo fmt`)" +description = "## Format code files (with `cargo fmt`; includes tests)" category = "[project]" dependencies = [ "action-format", - "action-determine-tests", "action-format-tests", ] @@ -268,6 +267,9 @@ args = ["build", "--release", "--no-default-features", "--features", "${CARGO_MA [tasks.action-build-utils] description = "Build individual utilities" +dependencies = [ + "action-determine-utils", +] command = "cargo" # args = ["build", "@@remove-empty(CARGO_MAKE_TASK_BUILD_UTILS_ARGS)" ] args = ["build", "--release", "@@split(CARGO_MAKE_TASK_BUILD_UTILS_ARGS, )" ] @@ -312,10 +314,13 @@ script = [ ''' test_files = glob_array tests/**/*.rs for file in ${test_files} - if is_empty "${tests}" - tests = set "${file}" - else - tests = set "${tests} ${file}" + file = replace "${file}" "\\" "/" + if not is_empty ${file} + if is_empty "${tests}" + tests = set "${file}" + else + tests = set "${tests} ${file}" + end_if end_if end set_env CARGO_MAKE_VAR_TESTS "${tests}" @@ -329,6 +334,9 @@ args = ["fmt"] [tasks.action-format-tests] description = "`cargo fmt` tests" +dependencies = [ + "action-determine-tests", +] command = "cargo" args = ["fmt", "--", "@@split(CARGO_MAKE_VAR_TESTS, )"]