-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTaskfile.yml
43 lines (36 loc) · 985 Bytes
/
Taskfile.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
version: "3"
dotenv:
- .env
tasks:
default:
silent: true
cmd: task --list-all
build:
deps:
- generate
env:
CGO_ENABLED: 0
cmd: go build -o readflow main.go
generate:
vars:
GENQLIENT_VERSION:
sh: grep -m 1 genqlient go.mod | awk '{ print $2 }'
cmds:
- go get github.com/Khan/genqlient@{{ .GENQLIENT_VERSION }}
- defer: go mod tidy
- go generate ./...
test:
cmd: go test ./...
download-schemas:
cmds:
- "gquil introspection generate-sdl https://graphql.anilist.co > schemas/anilist/schema.gql"
- "gquil introspection generate-sdl https://api.hardcover.app/v1/graphql -H 'Authorization: {{ .HARDCOVER_TOKEN }}' > schemas/hardcover/schema.gql"
requires:
vars: [HARDCOVER_TOKEN]
version:
vars:
NEW_VERSION:
sh: git cliff --bumped-version
prompt: "Bumping version to {{ .NEW_VERSION }}, continue?"
cmds:
- git tag -f {{ .NEW_VERSION }}