duckscript/Makefile.toml
sagie gur ari 56c635b949 docs
2020-04-24 12:36:50 +00:00

81 lines
1.5 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 = [
"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_runner = "@duckscript"
script = [
'''
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-scripts]
workspace = false
command = "cargo"
args = [
"run",
"--",
"--eval",
"test_directory ./test"
]
[tasks.workspace-docs]
dependencies = [
"generate-sdk-docs",
"generate-readme"
]
[tasks.install_local]
workspace = false
cwd = "./duckscript_cli"
command = "cargo"
args = [ "install", "--force", "--path", "." ]