[config] additional_profiles = [ "all-default-tasks", "multi-phase-tests", "ci-coverage-tasks", "ci-static-code-analysis-tasks", "ci-all-build-tasks", "publish-pre-cleanup", ] [env] CARGO_MAKE_SKIP_SLOW_SECONDARY_FLOWS = true CARGO_MAKE_ADDITIONAL_BINARY_EXECUTABLE_NAME = "makers" 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" } } [tasks.post-print-env] category = "Tools" script = ''' #!@duckscript echo "*************************************" echo "Extended Info:" echo " Unstable Environment Key: ${CARGO_MAKE_TEMP_UNSTABLE_KEY}" echo " Unstable Test Environment: ${CARGO_MAKE_TEMP_UNSTABLE_TEST_ENV}" echo "*************************************" ''' [tasks.test-multi-phases-cleanup] script = ''' #!@duckscript fn delete_all files = set ${1} for file in ${files} echo Deleting lock file: ${file} rm ${file} end release ${files} end handle = glob_array ./src/**/Cargo.lock delete_all ${handle} handle = glob_array ./examples/**/Cargo.lock delete_all ${handle} ''' [tasks.test-multi-phases-flow] condition = { env_false = ["CARGO_MAKE_TEMP_UNSTABLE_TEST_ENV"] } [tasks.audit] ignore_errors = true [tasks.generate-readme] script = ''' #!@duckscript echo Generating README rm ./README.md # concat templates readme_text = readfile ./docs/_includes/README.md text = readfile ./docs/_includes/nav.md readme_text = set "${readme_text}${text}" text = readfile ./docs/_includes/content.md readme_text = set "${readme_text}${text}" # modify templates crate_version = get_env CARGO_MAKE_CRATE_VERSION readme_text = replace ${readme_text} https://github.com/sagiegurari/cargo-make/blob/master/.github .github readme_text = replace ${readme_text} "{{ site.version }}" ${crate_version} writefile ./README.md ${readme_text} ''' [tasks.generate-task-list] command = "cargo" args = [ "run", "--bin", "cargo-make", "--", "make", "--list-all-steps", "--output-format", "markdown-single-page", "--output-file", "${CARGO_MAKE_WORKING_DIRECTORY}/docs/cargo_make_task_list.md", "--makefile", "${CARGO_MAKE_WORKING_DIRECTORY}/src/lib/test/makefiles/empty.toml", ] [tasks.generate-docs] condition = { env_false = ["CARGO_MAKE_CI"], platforms = ["linux"] } run_task = { name = ["generate-readme", "generate-task-list"] } [tasks.post-docs] linux_alias = "generate-docs" [tasks.pre-build-file-increment] env = { CARGO_MAKE_BUILD_NUMBER_FILE = "${CARGO_MAKE_WORKING_DIRECTORY}/.buildnumber" }