-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
31 lines (22 loc) · 926 Bytes
/
Makefile
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
d=docker run --rm -it -v `pwd`:/data --workdir /data naas-models-builder:latest
protoc=$(d) protoc
generate: clean python go build submodules
docker-compose run --rm -it python
cd python/naas_models && sed -i.bak 's/import validate_pb2/import naas_models.validate_pb2/g' *.py && rm *.bak
cd python/naas_models/pydantic && sed -i.bak 's/common_p2p/naas_models.pydantic.common_p2p/g' *.py && rm *.bak
cd python/naas_models/pydantic && sed -i.bak 's/errors_p2p/naas_models.pydantic.errors_p2p/g' *.py && rm *.bak
build:
docker-compose build
python: python/naas_models python/naas_models/pydantic
python/naas_models:
mkdir -p python/naas_models
python/naas_models/pydantic: python/naas_models
mkdir -p python/naas_models/pydantic
go:
mkdir go
clean:
rm -rf dist go python/naas_models/*_pb2.py python/naas_models/pydantic/*_p2p.py
submodules:
git submodule init && git submodule update
bash:
$(d) /bin/bash