1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-27 11:07:44 +00:00

maint/build ~ fix cargo-make format (Makefile.toml)

This commit is contained in:
Roy Ivy III 2020-05-24 13:08:18 -05:00
parent 8a91f1dea4
commit f7f872f7ea

View file

@ -161,11 +161,10 @@ alias = "build-examples"
alias = "build-features" alias = "build-features"
[tasks.format] [tasks.format]
description = "## Format code files (with `cargo fmt`)" description = "## Format code files (with `cargo fmt`; includes tests)"
category = "[project]" category = "[project]"
dependencies = [ dependencies = [
"action-format", "action-format",
"action-determine-tests",
"action-format-tests", "action-format-tests",
] ]
@ -268,6 +267,9 @@ args = ["build", "--release", "--no-default-features", "--features", "${CARGO_MA
[tasks.action-build-utils] [tasks.action-build-utils]
description = "Build individual utilities" description = "Build individual utilities"
dependencies = [
"action-determine-utils",
]
command = "cargo" command = "cargo"
# args = ["build", "@@remove-empty(CARGO_MAKE_TASK_BUILD_UTILS_ARGS)" ] # args = ["build", "@@remove-empty(CARGO_MAKE_TASK_BUILD_UTILS_ARGS)" ]
args = ["build", "--release", "@@split(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 test_files = glob_array tests/**/*.rs
for file in ${test_files} for file in ${test_files}
if is_empty "${tests}" file = replace "${file}" "\\" "/"
tests = set "${file}" if not is_empty ${file}
else if is_empty "${tests}"
tests = set "${tests} ${file}" tests = set "${file}"
else
tests = set "${tests} ${file}"
end_if
end_if end_if
end end
set_env CARGO_MAKE_VAR_TESTS "${tests}" set_env CARGO_MAKE_VAR_TESTS "${tests}"
@ -329,6 +334,9 @@ args = ["fmt"]
[tasks.action-format-tests] [tasks.action-format-tests]
description = "`cargo fmt` tests" description = "`cargo fmt` tests"
dependencies = [
"action-determine-tests",
]
command = "cargo" command = "cargo"
args = ["fmt", "--", "@@split(CARGO_MAKE_VAR_TESTS, )"] args = ["fmt", "--", "@@split(CARGO_MAKE_VAR_TESTS, )"]