rox-cli 0.4.1

Composable build tool inspired by Make
Documentation
version_requirements:
  - command: "cargo nextest --version"
    minimum_version: "0.9.0"
    split: true

file_requirements:
  - path: "Cargo.toml"

  - path: ".env"
    create_if_not_exists: true

templates:
  - name: docker_build
    command: "docker build {path} -t rox:{image_tag}"
    symbols: ["{path}", "{image_tag}"]

pipelines:
  - name: build-release-all
    description: "Build a release artifact binary and Docker image"
    stages:
      - ["build-release-binary", "build-release-image"]

  - name: ci
    description: "Run all CI-related tasks"
    stages:
      - ["fmt", "clippy-ci"]
      - ["test"]

tasks:
  - name: "wt"
    command: "cargo watch -c -x test"
    description: "Rerun tests on every file change"

  - name: "wc"
    command: "cargo watch -c -x check"
    description: "Rerun checks on every file change"

  - name: "clippy-ci"
    description: "Run Clippy with a non-zero exit if warnings are found."
    command: "cargo clippy -- -D warnings"

  - name: fmt
    command: "cargo fmt"

  - name: test
    command: "cargo nextest run"
    description: "Run tests"

  - name: build-binary
    command: "cargo build"
    description: "Build the dev binary"

  - name: run
    description: "Runs the 'help' command as a basic test"
    command: "cargo run help"

  # Release-related
  - name: build-release-binary
    description: "Build a release binary with cargo."
    command: "cargo build --release"

  - name: build-release-image
    description: "Build a production image for Docker."
    command: "docker build tests/files/ -t rox:latest"

  # This won't show up in the CLI help output
  - name: invalid
    description: "This task will throw an error becasue it has nothing to do!"
    hide: true