compendium/.justfile
2025-04-15 13:08:09 -04:00

25 lines
720 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
dev:
watchexec --clear --restart --watch=frontend --watch=src cargo run {{ if release_mode == "prod" { "--release" } else { "" } }}
build:
podman build --tag {{ container_image_name }}:latest --cache-to {{ container_image_name }}-cache --cache-from {{ container_image_name }}-cache .
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