Skip to content

Commit

Permalink
format all toml files
Browse files Browse the repository at this point in the history
  • Loading branch information
sagiegurari committed Nov 6, 2020
1 parent d9ba9a1 commit 7759a68
Show file tree
Hide file tree
Showing 46 changed files with 137 additions and 151 deletions.
1 change: 0 additions & 1 deletion .rusty-hook.toml
@@ -1,3 +1,2 @@
[hooks]
pre-push = "cargo run --bin cargo-make -- make ci-flow"

28 changes: 17 additions & 11 deletions Cargo.toml
Expand Up @@ -10,18 +10,24 @@ homepage = "https://sagiegurari.github.io/cargo-make"
repository = "https://github.com/sagiegurari/cargo-make.git"
readme = "README.md"
keywords = ["task", "build", "cargo", "plugin", "subcommand"]
categories = ["command-line-utilities", "development-tools", "development-tools::cargo-plugins", "development-tools::build-utils", "development-tools::testing"]
categories = [
"command-line-utilities",
"development-tools",
"development-tools::cargo-plugins",
"development-tools::build-utils",
"development-tools::testing",
]
include = [
"/benches/*",
"/docs/*",
"/examples/*",
"/src/*",
"/tests/*",
"/Cargo.toml",
"/LICENSE",
"/README.md",
"/CHANGELOG.md",
"/Makefile.toml"
"/benches/*",
"/docs/*",
"/examples/*",
"/src/*",
"/tests/*",
"/Cargo.toml",
"/LICENSE",
"/README.md",
"/CHANGELOG.md",
"/Makefile.toml",
]

[lib]
Expand Down
19 changes: 10 additions & 9 deletions Makefile.toml
@@ -1,18 +1,19 @@

[config]
additional_profiles = [
"multi-phase-tests",
"ci-coverage-tasks",
"ci-static-code-analysis-tasks",
"ci-all-build-tasks",
"publish-pre-cleanup"
"all-default-tasks",
"multi-phase-tests",
"ci-coverage-tasks",
"ci-static-code-analysis-tasks",
"ci-all-build-tasks",
"publish-pre-cleanup",
]

[env]
CARGO_MAKE_TEST_COVERAGE_BINARY_FILTER = "cli-[a-z0-9]*$\\|makers-[a-z0-9]*$\\|${CARGO_MAKE_TEST_COVERAGE_DEFAULT_BINARY_FILTER}"
CARGO_MAKE_TEMP_UNSTABLE_KEY = "${CARGO_MAKE_RUST_TARGET_OS}-${CARGO_MAKE_RUST_CHANNEL}-${CARGO_MAKE_CI}"
CARGO_MAKE_TEMP_UNSTABLE_TEST_ENV = { source = "${CARGO_MAKE_TEMP_UNSTABLE_KEY}", default_value = "false", mapping = {"none" = "true"} }
CARGO_MAKE_TEMP_UNSTABLE_FMT_ENV = { source = "${CARGO_MAKE_TEMP_UNSTABLE_KEY}", default_value = "false", mapping = {"windows-stable-true" = "true", "windows-beta-true" = "true", "windows-nightly-true" = "true", "linux-nightly-true" = "true"} }
CARGO_MAKE_TEMP_UNSTABLE_TEST_ENV = { source = "${CARGO_MAKE_TEMP_UNSTABLE_KEY}", default_value = "false", mapping = { "none" = "true" } }
CARGO_MAKE_TEMP_UNSTABLE_FMT_ENV = { source = "${CARGO_MAKE_TEMP_UNSTABLE_KEY}", default_value = "false", mapping = { "windows-stable-true" = "true", "windows-beta-true" = "true", "windows-nightly-true" = "true", "linux-nightly-true" = "true" } }

[tasks.post-print-env]
category = "Tools"
Expand Down Expand Up @@ -71,11 +72,11 @@ args = [
"--output-file",
"${CARGO_MAKE_WORKING_DIRECTORY}/docs/cargo_make_task_list.md",
"--makefile",
"${CARGO_MAKE_WORKING_DIRECTORY}/src/lib/test/makefiles/empty.toml"
"${CARGO_MAKE_WORKING_DIRECTORY}/src/lib/test/makefiles/empty.toml",
]

[tasks.generate-docs]
condition = { env_false = [ "CARGO_MAKE_CI" ], platforms = [ "linux" ] }
condition = { env_false = ["CARGO_MAKE_CI"], platforms = ["linux"] }
run_task = { name = ["generate-readme", "generate-task-list"] }

[tasks.post-docs]
Expand Down
2 changes: 1 addition & 1 deletion examples/alias.toml
Expand Up @@ -12,4 +12,4 @@ dependencies = ["D2"]
script = "echo hello"

[tasks.D2]
alias="D"
alias = "D"
4 changes: 1 addition & 3 deletions examples/clear.toml
Expand Up @@ -3,6 +3,4 @@ extend = "script.toml"
[tasks.hello-world]
clear = true
command = "echo"
args = [
"extended hello world"
]
args = ["extended hello world"]
16 changes: 6 additions & 10 deletions examples/condition.toml
Expand Up @@ -33,10 +33,10 @@ args = ["running test-default"]

[tasks.test-routing]
run_task = [
{ name = "test1", condition = { platforms = ["windows", "linux"], channels = ["beta", "stable"] } },
{ name = "test2", condition = { platforms = ["mac"], rust_version = { min = "1.20.0", max = "1.30.0" } } },
{ name = "test3", condition_script = [ "somecommand" ] },
{ name = "test-default" }
{ name = "test1", condition = { platforms = ["windows", "linux"], channels = ["beta", "stable"] } },
{ name = "test2", condition = { platforms = ["mac"], rust_version = { min = "1.20.0", max = "1.30.0" } } },
{ name = "test3", condition_script = ["somecommand"] },
{ name = "test-default" },
]

[tasks.test-true-condition]
Expand Down Expand Up @@ -64,9 +64,7 @@ echo "condition was met"
'''

[tasks.test-condition-script]
condition_script = [
"exit 1"
]
condition_script = ["exit 1"]
command = "echo"
args = ["condition was met"]

Expand All @@ -77,8 +75,6 @@ args = ["condition was met"]

[tasks.test-condition-script-with-message]
condition = { fail_message = "Condition Script Failed." }
condition_script = [
"exit 1"
]
condition_script = ["exit 1"]
command = "echo"
args = ["condition was met"]
1 change: 0 additions & 1 deletion examples/cross_platform_shell.toml
Expand Up @@ -4,4 +4,3 @@ script_runner = "@shell"
script = '''
rm ./myfile.txt
'''

15 changes: 3 additions & 12 deletions examples/cwd.toml
Expand Up @@ -8,10 +8,7 @@ echo CARGO_MAKE_CURRENT_TASK_INITIAL_MAKEFILE_DIRECTORY: ${CARGO_MAKE_CURRENT_TA

[tasks.cwd]
command = "pwd"
condition_script = [
"echo pwd during condition:",
"pwd"
]
condition_script = ["echo pwd during condition:", "pwd"]
install_script = '''
echo pwd during installation:
pwd
Expand All @@ -20,10 +17,7 @@ pwd
[tasks.change-cwd]
command = "pwd"
cwd = "./examples/files"
condition_script = [
"echo pwd during condition:",
"pwd"
]
condition_script = ["echo pwd during condition:", "pwd"]
install_script = '''
echo pwd during installation:
pwd
Expand All @@ -32,10 +26,7 @@ pwd
[tasks.makefile-cwd]
command = "pwd"
cwd = "${CARGO_MAKE_CURRENT_TASK_INITIAL_MAKEFILE_DIRECTORY}"
condition_script = [
"echo pwd during condition:",
"pwd"
]
condition_script = ["echo pwd during condition:", "pwd"]
install_script = '''
echo pwd during installation:
pwd
Expand Down
1 change: 0 additions & 1 deletion examples/duckscript.toml
Expand Up @@ -52,4 +52,3 @@ script = '''
#!@duckscript
sleep 1000
'''

25 changes: 12 additions & 13 deletions examples/env.toml
@@ -1,11 +1,8 @@

env_files = [
{ path = "./profile.env", profile = "development" },
{ path = "./test.env" }
]
env_files = [{ path = "./profile.env", profile = "development" }, { path = "./test.env" }]

env_scripts = [
'''
'''
#!@duckscript
echo first env script...
Expand All @@ -14,13 +11,13 @@ echo COMPOSITE = ${composite_env_value}
set_env COMPOSITE_2 ${composite_env_value}
''',
'''
'''
#!@duckscript
echo second env script...
composite_env_value = get_env COMPOSITE_2
echo COMPOSITE_2 = ${composite_env_value}
'''
''',
]

[config]
Expand All @@ -33,11 +30,15 @@ COMPOSITE = "simple value: ${SIMPLE} script value: ${SCRIPT}"
ECHO_CMD = "echo"
MULTI_LINE_SCRIPT = { script = ["echo 1\necho 2"], multi_line = true }
BOOL_VALUE = true
LIBRARY_EXTENSION = { source = "${CARGO_MAKE_RUST_TARGET_OS}", default_value = "unknown", mapping = {"linux" = "so", "macos" = "dylib", "windows" = "dll", "openbsd" = "so" } }
LIBRARY_EXTENSION = { source = "${CARGO_MAKE_RUST_TARGET_OS}", default_value = "unknown", mapping = { "linux" = "so", "macos" = "dylib", "windows" = "dll", "openbsd" = "so" } }
TO_UNSET = { unset = true }
PREFER_EXISTING = "original"
OVERWRITE_EXISTING = "original"
ENV_FROM_LIST = ["ARG1", "${SIMPLE}", "simple value: ${SIMPLE} script value: ${SCRIPT}"]
ENV_FROM_LIST = [
"ARG1",
"${SIMPLE}",
"simple value: ${SIMPLE} script value: ${SCRIPT}",
]
CONDITIONED_VALUE = { value = "${SIMPLE}", condition = { env_set = ["SIMPLE"] } }

[env.override-test]
Expand All @@ -64,7 +65,7 @@ echo git branch: ${CARGO_MAKE_GIT_BRANCH}
'''

[tasks.wrapper]
condition = { env_not_set = [ "SKIP_TASK" ] }
condition = { env_not_set = ["SKIP_TASK"] }
run_task = "echo"

[tasks.test-flow]
Expand Down Expand Up @@ -93,9 +94,7 @@ env = { "IS_LINUX" = "YAP" }

[tasks.expand]
command = "${ECHO_CMD}"
args = [
"VALUE: ${SIMPLE}"
]
args = ["VALUE: ${SIMPLE}"]

[tasks.multi-line]
script = '''
Expand Down
2 changes: 1 addition & 1 deletion examples/extending.toml
Expand Up @@ -2,4 +2,4 @@
extend = "alias.toml"

[tasks.extended]
alias="D2"
alias = "D2"
8 changes: 6 additions & 2 deletions examples/extends_list.toml
@@ -1,5 +1,9 @@

extend = [ { path = "alias.toml" }, { path = "optional_makefile.toml", optional = true }, { path = "cwd.toml" } ]
extend = [
{ path = "alias.toml" },
{ path = "optional_makefile.toml", optional = true },
{ path = "cwd.toml" },
]

[tasks.extended]
alias="D2"
alias = "D2"
2 changes: 1 addition & 1 deletion examples/extends_not_found.toml
Expand Up @@ -2,4 +2,4 @@
extend = "bad.toml"

[tasks.extended]
alias="D2"
alias = "D2"
2 changes: 1 addition & 1 deletion examples/extends_optional_not_found.toml
Expand Up @@ -2,4 +2,4 @@
extend = { path = "does_not_exist_makefile.toml", optional = true }

[tasks.extended]
alias="D2"
alias = "D2"
2 changes: 1 addition & 1 deletion examples/files/extending.toml
Expand Up @@ -5,4 +5,4 @@ extend = "../extending.toml"
init_task = "test_init"

[tasks.extended2]
alias="extended"
alias = "extended"
21 changes: 18 additions & 3 deletions examples/functions.toml
Expand Up @@ -44,12 +44,27 @@ args = ["clippy", "@@split(CARGO_MAKE_CLIPPY_ARGS, )"]

[tasks.decode]
command = "echo"
args = ["Env:", "${DECODE_ENV_VAR}", "Decoded:", "@@decode(DECODE_ENV_VAR,development,dev,ci,test)"]
args = [
"Env:",
"${DECODE_ENV_VAR}",
"Decoded:",
"@@decode(DECODE_ENV_VAR,development,dev,ci,test)",
]

[tasks.decode-with-default]
command = "echo"
args = ["Env:", "${DECODE_ENV_VAR}", "Decoded:", "@@decode(DECODE_ENV_VAR,development,dev,ci,test,unknown)"]
args = [
"Env:",
"${DECODE_ENV_VAR}",
"Decoded:",
"@@decode(DECODE_ENV_VAR,development,dev,ci,test,unknown)",
]

[tasks.decode-with-eval]
command = "echo"
args = ["Env:", "${DECODE_ENV_VAR}", "Decoded:", "@@decode(DECODE_ENV_VAR,test,The current profile is: ${CARGO_MAKE_PROFILE})"]
args = [
"Env:",
"${DECODE_ENV_VAR}",
"Decoded:",
"@@decode(DECODE_ENV_VAR,test,The current profile is: ${CARGO_MAKE_PROFILE})",
]
1 change: 0 additions & 1 deletion examples/javascript.toml
Expand Up @@ -4,4 +4,3 @@ script_extension = "js"
script = '''
console.log('Hello, World!');
'''

1 change: 0 additions & 1 deletion examples/perl.toml
Expand Up @@ -4,4 +4,3 @@ script_extension = "pl"
script = '''
print "Hello, World!\n";
'''

1 change: 0 additions & 1 deletion examples/php.toml
Expand Up @@ -14,4 +14,3 @@ script = '''
<?php
echo "Hello, World!\n";
'''

1 change: 0 additions & 1 deletion examples/platform_override.toml
Expand Up @@ -19,4 +19,3 @@ echo "Hello World From Unknown"
script = '''
echo "Hello World From Linux"
'''

8 changes: 4 additions & 4 deletions examples/profile.toml
Expand Up @@ -36,11 +36,11 @@ echo CARGO_MAKE_RUN_CODECOV: ${CARGO_MAKE_RUN_CODECOV}
'''

[tasks.echo-development]
condition = { profiles = [ "development" ] }
condition = { profiles = ["development"] }
command = "echo"
args = [ "running in development profile" ]
args = ["running in development profile"]

[tasks.echo-production]
condition = { profiles = [ "production" ] }
condition = { profiles = ["production"] }
command = "echo"
args = [ "running in production profile" ]
args = ["running in production profile"]
1 change: 0 additions & 1 deletion examples/python.toml
Expand Up @@ -5,4 +5,3 @@ script_extension = "py"
script = '''
print("Hello, World!")
'''

9 changes: 2 additions & 7 deletions examples/run_task.toml
Expand Up @@ -4,9 +4,7 @@ script = "echo hello world"

[tasks.flow]
run_task = "echo"
condition_script = [
"exit 0"
]
condition_script = ["exit 0"]

[tasks.echo1]
command = "echo"
Expand All @@ -20,9 +18,7 @@ args = ["2"]
run_task = { name = ["echo1", "echo2"] }

[tasks.routing-multi]
run_task = [
{ name = ["echo1", "echo2"] },
]
run_task = [{ name = ["echo1", "echo2"] }]

[tasks.parallel-multi]
run_task = { name = ["echo1", "echo2"], parallel = true }
Expand All @@ -39,4 +35,3 @@ run_task = { name = ["echo1", "echo2"], fork = true, cleanup_task = "cleanup" }

[tasks.cleanup-example-with-error]
run_task = { name = ["echo1", "echo2", "fail"], fork = true, cleanup_task = "cleanup" }

0 comments on commit 7759a68

Please sign in to comment.