softplayer-proto/Makefile

37 lines
1.1 KiB
Makefile
Raw Normal View History

2024-03-17 18:23:28 +00:00
# ---------------------------------------------------------------------
# -- Which container tool to use
# ---------------------------------------------------------------------
CONTAINER_TOOL ?= docker
protoc-docs-gen:
protoc \
--proto_path=./proto \
--doc_out=. \
--doc_opt=markdown,readme.md \
$$(find ./proto -type f -iname "*.proto")
docker-docs-gen:
$(CONTAINER_TOOL) run --rm \
-v $$(pwd):/out \
-v $$(pwd)/proto:/proto \
pseudomuto/protoc-gen-doc --doc_opt=markdown,README.md --proto_path=proto \
$$(find proto -type f -iname "*.proto")
docker-lint:
$(CONTAINER_TOOL) run --rm \
-v $$(pwd):/workspace \
--workdir /workspace \
yoheimuta/protolint lint \
$$(find . -type f -iname "*.proto")
docker-protobuf:
$(CONTAINER_TOOL) build -t gogen . && \
$(CONTAINER_TOOL) run --rm \
-v $$(pwd)/proto:/proto \
-v $$(pwd)/pkg:/pkg \
gogen \
protoc --go_out=/pkg/ --go_opt=paths=source_relative \
--go-grpc_out=/pkg/ --go-grpc_opt=paths=source_relative \
--proto_path=proto/proto \
$$(find proto -type f -iname "*.proto")