-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
45 lines (36 loc) · 845 Bytes
/
Taskfile.yml
File metadata and controls
45 lines (36 loc) · 845 Bytes
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
44
45
# https://taskfile.dev
version: '3'
dotenv:
- ".env"
vars:
CMD_DIR: "./cmd"
BIN_DIR: "./bin"
tasks:
default:
cmds:
- for: [events, my-events]
task: go-build
vars:
NAME: '{{.ITEM}}'
go-build:
internal: true
cmds:
- go build -o {{.BIN_DIR}}/{{.NAME}} {{.CMD_DIR}}/{{.NAME}}
build:
cmds:
- task: go-build
vars: { NAME: '{{.CLI_ARGS}}' }
go-run:
internal: true
cmds:
- go run {{.CMD_DIR}}/{{.NAME}}
run:
cmds:
- task: go-run
vars: { NAME: '{{.CLI_ARGS}}' }
resources:
desc: curl 42 api and generate structs
dir: ./tools
cmds:
- curl https://api.intra.42.fr/apidoc | jq -f ./get-response_data.jq > ../resources.json
- gojson -input ../resources.json -o new_structs.go -pkg goft -subStruct -name _