Taskfile.yaml

 1version: '3'
 2
 3tasks:
 4  generate:
 5    desc: Generate OpenRouter models
 6    aliases: [gen]
 7    cmds:
 8      - go run cmd/openrouter/main.go
 9
10  lint:
11    desc: Run linters
12    cmds:
13      - golangci-lint run ./...
14
15  lint:fix:
16    desc: Run linters and fix issues
17    cmds:
18      - golangci-lint run --fix ./...
19
20  fmt:
21    desc: Format code
22    cmds:
23      - go fmt ./...
24
25  modernize:
26    desc: Modernize code
27    cmds:
28      - modernize ./...
29
30  install:
31    desc: Install catwalk locally
32    cmds:
33      - go install -v .
34
35  run:
36    desc: Run catwalk
37    aliases: [default]
38    cmds:
39      - go run .
40  release:
41    desc: Create and push a new tag following semver
42    vars:
43      NEXT:
44        sh: svu next --always || go run github.com/caarlos0/svu/v3@latest next --always
45    prompt: "This will release {{.NEXT}}. Continue?"
46    preconditions:
47      - sh: '[ $(git symbolic-ref --short HEAD) = "main" ]'
48        msg: Not on main branch
49      - sh: "[ $(git status --porcelain=2 | wc -l) = 0 ]"
50        msg: "Git is dirty"
51    cmds:
52      - git commit --allow-empty -m "{{.NEXT}}"
53      - git tag --annotate --sign -m "{{.NEXT}}" {{.NEXT}} {{.CLI_ARGS}}
54      - echo "Pushing {{.NEXT}}..."
55      - git push origin main --follow-tags