cargo-make 0.3.6

Rust task runner and build tool.

[env]
CARGO_MAKE = "true"
RUST_BACKTRACE = "full"

[tasks.default]
# Default task points to the development testing flow
dependencies = [
    "dev-test-flow"
]

[tasks.ci-flow]
# CI task will run cargo build and cargo test with verbose output
dependencies = [
    "pre-build",
    "build-verbose",
    "post-build",
    "pre-test",
    "test-verbose",
    "post-test"
]

[tasks.dev-test-flow]
# Development testing flow will first format the code, and than run cargo build and test
dependencies = [
    "format-flow",
    "pre-build",
    "build",
    "post-build",
    "pre-test",
    "test",
    "post-test"
]

[tasks.publish-flow]
# Publish flow - First clean the target directory of any old leftovers, package and publish
dependencies = [
    "pre-clean",
    "clean",
    "post-clean",
    "pre-publish",
    "publish",
    "post-publish"
]

[tasks.build-flow]
# This is the full sanity testing flow which includes:
# cleanup of old build
# generating docs and moving them to the docs folder
# running cargo build and test
# running cargo plugins such as security and dependency validations
dependencies = [
    "init",
    "pre-clean",
    "clean-apidocs",
    "clean",
    "post-clean",
    "format-flow",
    "pre-build",
    "build",
    "post-build",
    "pre-test",
    "test",
    "post-test",
    "pre-verify-project",
    "verify-project",
    "post-verify-project",
    "pre-audit",
    "audit",
    "post-audit",
    "pre-outdated",
    "outdated",
    "post-outdated",
    "pre-docs",
    "docs",
    "post-docs",
    "copy-apidocs",
    "end"
]

[tasks.empty]

[tasks.init]

[tasks.pre-clean]

[tasks.clean-apidocs]
command = "rm"
args = ["-Rf", "./docs/api"]

[tasks.clean]
command = "cargo"
args = ["clean"]

[tasks.post-clean]

[tasks.pre-format]

[tasks.format]
install_crate = "rustfmt"
command = "cargo"
args = ["fmt", "--", "--write-mode=overwrite"]

[tasks.post-format]

[tasks.format-flow]
dependencies = [
    "pre-format",
    "format",
    "post-format"
]

[tasks.pre-docs]

[tasks.docs]
command = "cargo"
args = ["doc", "--no-deps"]

[tasks.post-docs]

[tasks.pre-build]

[tasks.build]
command = "cargo"
args = ["build"]

[tasks.build-verbose]
command = "cargo"
args = ["build", "--verbose"]

[tasks.post-build]

[tasks.pre-test]

[tasks.test]
command = "cargo"
args = ["test"]

[tasks.test-verbose]
command = "cargo"
args = ["test", "--verbose"]

[tasks.post-test]

[tasks.pre-bench]

[tasks.bench]
command = "cargo"
args = ["bench"]

[tasks.post-bench]

[tasks.bench-flow]
dependencies = [
    "pre-bench",
    "bench",
    "post-bench"
]

[tasks.pre-verify-project]

[tasks.verify-project]
command = "cargo"
args = ["verify-project"]

[tasks.post-verify-project]

[tasks.pre-audit]

[tasks.audit]
install_crate = "cargo-audit"
command = "cargo"
args = ["audit"]

[tasks.post-audit]

[tasks.pre-outdated]

[tasks.outdated]
install_crate = "cargo-outdated"
command = "cargo"
args = ["outdated", "--root-deps-only", "--exit-code", "1"]

[tasks.post-outdated]

[tasks.clippy]
install_crate = "clippy"
command = "cargo"
args = ["clippy"]

[tasks.copy-apidocs]
script = [
    "mkdir -p ./docs/api",
    "mv ./target/doc/* ./docs/api"
]

[tasks.end]

[tasks.pre-package]

[tasks.package]
command = "cargo"
args = ["package"]

[tasks.post-package]

[tasks.pre-publish]

[tasks.publish]
command = "cargo"
args = ["publish"]

[tasks.post-publish]

[tasks.pre-git-add]

[tasks.git-add]
command = "git"
args = ["add", "."]

[tasks.post-git-add]

[tasks.pre-git-status]

[tasks.git-status]
command = "git"
args = ["status"]

[tasks.post-git-status]

[tasks.pre-git-commit]

[tasks.git-commit]
command = "git"
args = ["commit"]

[tasks.git-commit-message]
script = [
    "git commit -m \"$COMMIT_MSG\""
]

[tasks.post-git-commit]

[tasks.pre-git-push]

[tasks.git-push]
command = "git"
args = ["push"]

[tasks.post-git-push]