Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makefile: update protobuf generation instructions #107

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 37 additions & 9 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@


[[constraint]]
name = "github.com/golang/protobuf"
name = "google.golang.org/protobuf"
version = "1.0.0"

[[constraint]]
Expand Down
5 changes: 1 addition & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ endif
nothing:

generate_proto:
docker run --rm -v $(PWD):$(PWD) -w $(PWD) znly/protoc -I. --go_out=Mgoogle/protobuf/field_mask.proto=github.com/google/go-genproto/protobuf/field_mask,plugins=grpc:./ ./google_libphonenumber/resources/*.proto
mv ./google_libphonenumber/resources/*.pb.go ./
sudo chown -R $(WHOAMI) *
$(SED_I) -E 's/package i18n_phonenumbers/package libphonenumber/g' $(shell ls *.pb.go)
protoc -I. --go_out=. --go_opt=Mgoogle_libphonenumber/resources/phonemetadata.proto=../libphonenumber --go_opt=Mgoogle_libphonenumber/resources/phonenumber.proto=../libphonenumber ./google_libphonenumber/resources/*.proto
awk '/static const unsigned char/ { show=1 } show; /}/ { show=0 }' ./google_libphonenumber/cpp/src/phonenumbers/metadata.cc | tail -n +2 | sed '$$d' | sed -E 's/([^,])$$/\1,/g' | awk 'BEGIN{print "package libphonenumber\nvar metaData = []byte{"}; {print}; END{print "}"}' > metagen.go
go fmt ./metagen.go

Expand Down
26,240 changes: 13,497 additions & 12,743 deletions metagen.go

Large diffs are not rendered by default.

Loading