binary := "lethe"
version := `git describe --tags 2>/dev/null || echo dev`

default:
    @just --list

build:
    CGO_ENABLED=0 go build -ldflags "-X main.version={{version}}" -o {{binary}} ./cmd/lethe

run:
    go run ./cmd/lethe -config config.yaml

air:
    air

test:
    go test -race ./...

lint:
    golangci-lint run --fix ./...

fmt:
    gofmt -w .
    goimports -w .

tidy:
    go mod tidy

docker-build:
    docker build -t {{binary}}:{{version}} .

docker-up:
    docker compose up -d

docker-down:
    docker compose down
