-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (35 loc) · 1.23 KB
/
Makefile
File metadata and controls
48 lines (35 loc) · 1.23 KB
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
GOOGLE_PROTO_ROOT = protos/
GOOGLE_PROTO_FILES = \
google/protobuf/descriptor.proto \
google/protobuf/any.proto \
google/api/http.proto \
google/api/annotations.proto
SPAWN_PROTO_ROOT = protos/eigr
SPAWN_PROTO_FILES = \
spawn/actors/actor.proto \
spawn/actors/state.proto \
spawn/actors/protocol.proto \
spawn/actors/extensions.proto \
spawn/actors/healthcheck.proto \
spawn/actors/test.proto
.PHONY: all
all: build compile-proto install
# Tasks
build: clean deps
echo "Building the project..."
clean:
echo "Cleaning up..."
deps:
echo "Installing dependencies..."
luarocks install --local lua-protobuf
luarocks install --local luasocket
luarocks install --local lua-cjson
install: build
echo "Installing the project..."
luarocks make --local spawn-lua-sdk-0.1-0.rockspec
test:
go test -v ./...
compile-proto:
echo "Compiling protobuf files..."
docker run --rm -v $(pwd):/work -w /work znly/protoc --plugin=protoc-gen-lua=/usr/bin/protoc-gen-lua --lua_out=src/generated -I=${GOOGLE_PROTO_ROOT} ${GOOGLE_PROTO_FILES}
docker run --rm -v $(pwd):/work -w /work znly/protoc --plugin=protoc-gen-lua=/usr/bin/protoc-gen-lua --lua_out=src/generated -I=${SPAWN_PROTO_ROOT} ${SPAWN_PROTO_FILES}