Skip to content

codeplaytech/docker-protoc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Usage

Bash

docker run --rm -it ghcr.io/codeplaytech/protoc:v3.19.6-5

Makefile

work_dir :=$(CURDIR)
protoc :=sudo docker run -it --rm \
	-v $(work_dir)/:/server \
	-w /server \
	ghcr.io/codeplaytech/protoc:v3.19.6-5

proto_opts:=-I=. --gogoslick_out=Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types:.
grain_opts:=-I=. --gograinv2_out=.

proto:
	@for f in $(shell find . -iname "*.proto"); do \
		echo compiling $$f;  \
		$(protoc) $(proto_opts) $$f; \
	done


proto-grain:
	@for f in $(shell find . -iname "api.proto"); do \
		echo compiling $$f;  \
		$(protoc) $(proto_opts) $$f; \
		$(protoc) $(grain_opts) $$f; \
	done
	sudo rm -fr github_com/
	sudo rm -fr google/

Build

推送 git tag 即可自动触发 github action 构建