-
Notifications
You must be signed in to change notification settings - Fork 1
/
HyperMake
113 lines (100 loc) · 2.17 KB
/
HyperMake
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
---
format: hypermake.v0
name: tbus
description: TBus is Software Defined Bus for Things
targets:
toolchain:
description: toolchain to build Go source code
watches:
- hack/toolchain
build: hack/toolchain
vendor-codegen:
description: fetch dependencies for codegen
after:
- toolchain
watches:
- codegen/vendor/manifest
workdir: codegen
cmds:
- gvt restore
vendor-go:
description: fetch dependencies for tbus Go pkg
after:
- toolchain
watches:
- go/vendor/manifest
workdir: go
cmds:
- gvt restore
codegen:
description: build code generator
after:
- vendor-codegen
watches:
- codegen/**/**/*.go
cmds:
- mkdir -p bin
- go build -o bin/protoc-gen-tbus ./codegen/cmd/protoc-gen-tbus
- go build -o bin/tbus-proto-gen ./codegen/cmd/tbus-proto-gen
artifacts:
- bin/protoc-gen-tbus
- bin/tbus-proto-gen
gen-go:
description: generate source code for Go
after:
- codegen
watches:
- proto
cmds:
- 'export PATH=`pwd`/bin:$PATH'
- TBUS_INTERNAL=1 tbus-proto-gen -lang=go -out=go -from=proto tbus
gen-node:
description: generate source code for Node.js
after:
- codegen
watches:
- proto
cmds:
- mkdir -p node/gen
- 'export PATH=`pwd`/bin:$PATH'
- TBUS_INTERNAL=1 tbus-proto-gen -lang=js -out=node/gen -from=proto tbus
generate:
description: generate source code
after:
- 'gen-*'
test-go:
description: test go code
after:
- gen-go
- vendor-go
watches:
- go/tbus
cmds:
- go test -v ./go/tbus/...
test-node:
description: test Node.js source code
after:
- gen-node
- node-deps
watches:
- node
cmds:
- cd node
- ./node_modules/.bin/mocha
test:
description: run tests
after:
- 'test-*'
node-deps:
description: install node modules
after:
- toolchain
watches:
- node/package.json
cmds:
- cd node
- npm install
settings:
docker:
image: 'tbus-toolchain:latest'
src-volume: /go/src/github.com/robotalks/tbus