duckscript/Makefile.toml
2020-11-15 14:01:00 +00:00

70 lines
1.6 KiB
TOML

[env]
CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true
CARGO_MAKE_BINARY_EXECUTABLE_NAME = "duck"
[env.sdk]
CARGO_MAKE_WORKSPACE_INCLUDE_MEMBERS = ["duckscript_sdk", "duckscript_cli"]
[env.cli]
CARGO_MAKE_WORKSPACE_INCLUDE_MEMBERS = "duckscript_cli"
[config]
main_project_member = "duckscript_cli"
additional_profiles = [
"all-default-tasks",
"ci-coverage-tasks",
"ci-all-build-tasks",
"ci-static-code-analysis-tasks",
"publish-pre-cleanup",
]
[tasks.clippy]
# due to rust bug on github actions flow
ignore_errors = true
[tasks.generate-sdk-docs]
workspace = false
command = "cargo"
args = ["run", "--", "--eval", "internal::SDKDocsGen std ./docs/sdk.md"]
[tasks.generate-readme]
workspace = false
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
readme_text = replace ${readme_text} https://github.com/sagiegurari/duckscript/blob/master/.github .github
writefile ./README.md ${readme_text}
'''
[tasks.test-script]
workspace = false
command = "cargo"
args = ["run", "--", "--eval", "test_file ./test/${@}"]
[tasks.test-scripts]
workspace = false
command = "cargo"
args = ["run", "--", "--eval", "test_directory ./test/"]
[tasks.workspace-docs]
workspace = false
dependencies = ["generate-sdk-docs", "generate-readme"]
[tasks.install_local]
workspace = false
cwd = "./duckscript_cli"
command = "cargo"
args = ["install", "--force", "--path", "."]