Files
games/Taskfile.yml
Ryan Hamamura 6d43bdea16
All checks were successful
CI / Deploy / test (pull_request) Successful in 16s
CI / Deploy / lint (pull_request) Successful in 25s
CI / Deploy / deploy (pull_request) Has been skipped
refactor: rename remaining c4 references to games
Update binary name, DB path, session cookie, deploy scripts, systemd
service, Docker config, CI workflow, and .dockerignore. Remove stale
Claude command and settings files.
2026-03-02 21:16:12 -10:00

86 lines
1.7 KiB
YAML

version: "3"
tasks:
download:
desc: Download latest client-side libs
cmds:
- go run cmd/downloader/main.go
build:templ:
desc: Compile .templ files to Go
cmds:
- go tool templ generate
sources:
- "**/*.templ"
generates:
- "**/*_templ.go"
build:styles:
desc: Build TailwindCSS styles
cmds:
- go tool gotailwind -i assets/css/input.css -o assets/css/output.css --minify
sources:
- "assets/css/input.css"
- "**/*.templ"
- "**/*.go"
generates:
- "assets/css/output.css"
build:
desc: Production build to bin/games
cmds:
- go build -o bin/games .
deps:
- build:templ
- build:styles
live:templ:
desc: Watch and recompile .templ files
cmds:
- go tool templ generate -watch
live:styles:
desc: Watch and rebuild TailwindCSS styles
cmds:
- go tool gotailwind -i assets/css/input.css -o assets/css/output.css -w
live:server:
desc: Run server with hot-reload via air
cmds:
- |
go tool air \
-build.cmd "go build -tags=dev -o tmp/bin/games ." \
-build.bin "tmp/bin/games" \
-build.exclude_dir "data,bin,tmp,deploy" \
-build.include_ext "go,templ" \
-misc.clean_on_exit "true"
live:
desc: Dev mode with hot-reload
deps:
- live:templ
- live:styles
- live:server
test:
desc: Run the test suite
cmds:
- go test ./...
lint:
desc: Run golangci-lint
cmds:
- golangci-lint run
run:
desc: Build and run the server
cmds:
- ./bin/games
deps:
- build
default:
desc: Run the default task (live)
cmds:
- task: live