#!/usr/bin/env cached-nix-shell
#!nix-shell -i "just --justfile"

docker-registry := "registry.fly.io/alanpearce-eu"

default:
	@just --list --justfile {{ justfile() }} --unsorted

clean:
	rm -fr public

check-licenses:
	go-licenses check ./...

check-links:
	hyperlink public --sources content

update-all:
	npins update
	go get -u all

build:
	templ generate
	go run ./cmd/build

dev:
	modd

ci: build check-links

cd *DEPLOY_FLAGS:
	fly auth docker
	templ generate
	fly deploy --image $(KO_DOCKER_REPO={{ docker-registry }} ko build --bare ./cmd/server) {{ DEPLOY_FLAGS }}