docker_image_name := "swift-hpa" install_path := "~/.local/share/bin/hpa" completion_path := "~/.local/share/zsh/completions/_hpa" build mode="debug": swift build -c {{mode}} alias b := build build-docker file="Dockerfile" tag="latest": @docker build \ --file docker/{{file}} \ --tag {{docker_image_name}}:{{tag}} . build-docker-test: (build-docker "Dockerfile.test" "test") test *ARGS: swift test {{ARGS}} alias t := test test-docker *ARGS: (build-docker-test) @docker run --rm \ --network host \ {{docker_image_name}}:test \ swift test {{ARGS}} run *ARGS: swift run hpa {{ARGS}} alias r := run clean: rm -rf .build update-version: @swift package \ --disable-sandbox \ --allow-writing-to-package-directory \ update-version \ hpa install: (build "release") @cp .build/release/hpa {{install_path}} @{{install_path}} --generate-completion-script zsh > {{completion_path}}