Permalink
Browse files

move around examples

Signed-off-by: Peter Edge <peter.edge@gmail.com>
  • Loading branch information...
peter-edge committed Mar 25, 2016
1 parent ccdd8b5 commit 417816e18ddfb9f0c0d8e1ab764df07cbdac56d8
Showing with 23 additions and 18 deletions.
  1. +1 −1 .dockerignore
  2. +1 −1 .gitignore
  3. +17 −14 Makefile
  4. +2 −0 README.md
  5. +2 −2 protoeasy-example-complete.yaml → example/protoeasy.yaml
View
@@ -1,2 +1,2 @@
.git
_example-out
example/out
View
@@ -1 +1 @@
_example-out
example/out
View
@@ -104,38 +104,41 @@ proto:
find . -name *\.pb\*\.go | grep -v vendor | xargs strip-package-comments
example-complete:
rm -rf _example-out/complete
rm -rf example/out
protoeasy \
--no-file \
--out=_example-out/complete \
--out=example/out/complete \
--cpp --cpp-rel-out=cpp \
--csharp --csharp-rel-out=csharp \
--objc --objc-rel-out=objc \
--python --python-rel-out=python \
--ruby --ruby-rel-out=ruby \
--go --go-rel-out=go --go-import-path=go.pedge.io/protoeasy/_example-out/complete/go \
--go --go-rel-out=go --go-import-path=go.pedge.io/protoeasy/example/out/complete/go \
--grpc \
--grpc-gateway \
example/complete
go build ./_example-out/complete/go/...
go build ./example/out/complete/go/...
rm -rf example/out
example-complete-file:
rm -rf _example-out/complete
protoeasy --out=_example-out/complete -f protoeasy-example-complete.yaml
go build ./_example-out/complete/go/...
rm -rf example/out
cd example && protoeasy --out=out/complete && cd -
go build ./example/out/complete/go/...
rm -rf example/out
example-proto2:
rm -rf _example-out/proto2
rm -rf example/out
protoeasy \
--out=_example-out/proto2 \
--out=example/out/proto2 \
--cpp --cpp-rel-out=cpp \
--python --python-rel-out=python \
--go --go-rel-out=go --go-import-path=go.pedge.io/protoeasy/_example-out/proto2/go \
--gogo --gogo-rel-out=gogo --gogo-import-path=go.pedge.io/protoeasy/_example-out/proto2/gogo \
--go --go-rel-out=go --go-import-path=go.pedge.io/protoeasy/example/out/proto2/go \
--gogo --gogo-rel-out=gogo --gogo-import-path=go.pedge.io/protoeasy/example/out/proto2/gogo \
--grpc \
example/proto2
go build ./_example-out/proto2/go/...
go build ./_example-out/proto2/gogo/...
go build ./example/out/proto2/go/...
go build ./example/out/proto2/gogo/...
rm -rf example/out
examples: install example-complete example-complete-file example-proto2
@@ -163,7 +166,7 @@ test: pretest
clean:
go clean -i $(PKGS)
rm -rf _example-out
rm -rf example/out
docker-build:
docker build -t quay.io/pedge/protoeasy .
View
@@ -55,6 +55,8 @@ protoeasy --go --grpc --go-import-path github.com/user/your-go-project --cpp --r
protoeasy --go --grpc --go-import-path github.com/user/your-go-project --exclude foo .
# this assumes your protocol buffers files are in ext/proto, and import paths are relative to ext/proto
protoeasy --go --grpc --go-import-path github.com/user/your-go-project/ext/proto ext/proto
# this assumes you have a protoeasy.yaml file in your current directory, see the file here as an example
protoeasy
```
### Motivation
@@ -1,5 +1,5 @@
version: v1
dir: example/complete
dir: complete
plugins:
- grpc
- grpc_gateway
@@ -17,7 +17,7 @@ options:
rel_out: csharp
go:
rel_out: go
import_path: go.pedge.io/protoeasy/_example-out/complete/go
import_path: go.pedge.io/protoeasy/example/out/complete/go
objc:
rel_out: objc
python:

0 comments on commit 417816e

Please sign in to comment.