version: "3" tasks: build: desc: Build dirmd with injected semantic version (task build VERSION=v0.1.4) deps: [vet] preconditions: - sh: printf '%s' '{{.VERSION}}' | grep -Eq '^v[0-9]+\.[0-9]+\.[0-9]+$' msg: "VERSION is required and must be a semantic tag like v0.1.4 — task build VERSION=v0.1.4" cmds: - go build -trimpath -ldflags "-s -w -X git.flo.fo/FLO/dirmd/internal/config.Version={{.VERSION}}" -o bin/dirmd . vet: desc: Run go vet cmds: - go vet ./... test: desc: Run all tests cmds: - go test ./...