-
Notifications
You must be signed in to change notification settings - Fork 3
/
Taskfile.yml
34 lines (33 loc) · 1.07 KB
/
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
version: "3"
tasks:
curlSpec:
cmds:
- curl -so service_types.json https://api.aiven.io/v1/service_types
curlSpecSensitive:
requires:
vars:
- AIVEN_TOKEN
- AIVEN_PROJECT_NAME
cmds:
- for: [integration_types, integration_endpoint_types]
cmd: 'curl -so {{.ITEM}}.json https://api.aiven.io/v1/project/{{.AIVEN_PROJECT_NAME}}/{{.ITEM}} --header "Authorization: aivenv1 {{.AIVEN_TOKEN}}"'
silent: true
generate:
cmds:
- go run main.go service_types.json integration_types.json integration_endpoint_types.json
run:
cmds:
- task: curlSpec
- task: curlSpecSensitive
- task: generate
build:
cmds:
- go build
test:
cmds:
- go test -v ./...
curlDist:
desc: During the development, the diff might change multiple times. Downloads files from main
cmds:
- for: [service_types, integration_types, integration_endpoint_types]
cmd: "curl -so ./pkg/dist/{{.ITEM}}.yml https://raw.githubusercontent.com/aiven/go-api-schemas/refs/heads/main/pkg/dist/{{.ITEM}}.yml"