mk 0.1.10

Yet another simple task runner 🦀
Documentation
tasks:
  install-hooks:
    commands:
      - command: git config --local core.hooksPath .githooks
        verbose: true
    description: Install git hooks
  fmt:
    commands:
      - command: cargo fmt --all
        verbose: true
    description: Format the project
  lint:
    commands:
      - command: cargo clippy --all-features --all-targets --tests --benches -- -Dclippy::all
        verbose: true
    description: Lint check the project
  check:
    commands:
      - command: cargo c
        verbose: true
    description: Check the project
  build:
    commands:
      - command: cargo b
        verbose: true
    description: Build the project
    depends_on:
      - name: check
  build-in-container:
    commands:
      - container_command:
          - cargo
          - c
        image: docker.io/library/rust:latest
        verbose: true
    description: Build the project in a container
    depends_on:
      - name: check
  pack:
    preconditions:
      - command: git diff-index --quiet --exit-code HEAD --
      - command: cargo c
    commands:
      - command: |
          latest_version=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[0].version')
          name=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[0].name')
          podman build \
            --sbom=true \
            --label org.opencontainers.image.created=$(date +%Y-%m-%dT%H:%M:%S%z) \
            --label org.opencontainers.image.authors=gh:@ffimnsr \
            --label org.opencontainers.image.description="$name $latest_version" \
            --label org.opencontainers.image.revision=$(git rev-parse HEAD) \
            --label org.opencontainers.image.source=$(git remote get-url origin) \
            --label org.opencontainers.image.title=$name \
            --label org.opencontainers.image.url=https://github.com/ffimnsr/mk-rs \
            --label org.opencontainers.image.version=$latest_version \
            -f Containerfile \
            -t ghcr.io/ffimnsr/$name-rs:$latest_version \
            -t ghcr.io/ffimnsr/$name-rs:latest .
        verbose: true
    description: Build the container image