-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathTaskfile.yaml
60 lines (53 loc) · 2.23 KB
/
Taskfile.yaml
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
version: '3'
tasks:
install-godeps:
cmds:
- go install github.com/atombender/go-jsonschema@latest
- go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.35.2
install-protoc:
cmds:
- curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v28.3/protoc-28.3-linux-x86_64.zip
- sudo unzip protoc-28.3-linux-x86_64.zip -d /usr/local
- rm protoc-28.3-linux-x86_64.zip
install-deps:
deps: [install-godeps, install-protoc]
proto:
dir: node/internal/actors/pb
sources:
- "*.proto"
generates:
- "*.go"
cmds:
- protoc --proto_path=. --go_out=. --go_opt=paths=source_relative *.proto
all-code-gen:
deps: [gen-schema-api, proto]
gen-schema-api:
dir: api
cmds:
- go-jsonschema
--package api --tags json
--schema-output=io.nats.nex.v2.agent_register_request=go/agent.go
--schema-output=io.nats.nex.v2.agent_register_response=go/agent.go
--schema-output=io.nats.nex.v2.agent_heartbeat=go/agent.go
--schema-output=io.nats.nex.v2.start_workload_request=go/shared.go
--schema-output=io.nats.nex.v2.start_workload_response=go/shared.go
--schema-output=io.nats.nex.v2.stop_workload_request=go/shared.go
--schema-output=io.nats.nex.v2.stop_workload_response=go/shared.go
--schema-output=io.nats.nex.v2.lameduck_request=go/shared.go
--schema-output=io.nats.nex.v2.lameduck_response=go/shared.go
--schema-output=io.nats.nex.v2.agent_ping_response=go/shared.go
--schema-output=io.nats.nex.v2.workload_ping_response=go/shared.go
--schema-output=shared=go/shared.go
--schema-output=io.nats.nex.v2.node_info_request=go/node.go
--schema-output=io.nats.nex.v2.node_info_response=go/node.go
--schema-output=io.nats.nex.v2.node_ping_response=go/node.go
--schema-output=io.nats.nex.v2.auction_request=go/node.go
--schema-output=io.nats.nex.v2.auction_response=go/node.go
--schema-output=io.nats.nex.v2.clone_workload_request=go/node.go
--schema-output=io.nats.nex.v2.clone_workload_response=go/node.go
*.json
nex:
deps: [all-code-gen]
dir: cmd/nex
cmds:
- go build -o ../../target/nex .