compendium/.justfile
2025-04-15 12:59:15 -04:00

25 lines
732 B
Makefile

set dotenv-load := true
bin_name := "compendium"
release_mode := "dev"
container_registry := "git.alecodes.page/alecodes"
container_image_name := container_registry / bin_name
build:
podman build --tag {{ container_image_name }}:latest --cache-to {{ container_image_name }}-cache --cache-from {{ container_image_name }}-cache .
dev:
watchexec --no-vcs-ignore --clear --restart --watch=dist --watch=src cargo run {{ if release_mode == "prod" { "--release" } else { "" } }}
test:
cargo test
publish: (build)
podman push {{ container_image_name }}:latest
podman push {{ container_image_name }}:latest {{ container_image_name }}:$(git rev-parse --short HEAD)
deploy:
clean:
podman system prune --build
cargo clean