Skip to content

Commit

Permalink
Merge pull request #1290 from mesg-foundation/feature/use-gogo-protobuf
Browse files Browse the repository at this point in the history
Use gogo protobuf
  • Loading branch information
Nicolas Mahé authored Sep 3, 2019
2 parents 13a6fc9 + c2c40fc commit b2dfe07
Show file tree
Hide file tree
Showing 15 changed files with 486 additions and 2,783 deletions.
17 changes: 12 additions & 5 deletions Dockerfile.tools
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,31 @@ RUN apt-get update -y && \
rm -rf /var/lib/apt/lists/*

# protobuf(protoc) version.
ARG protobuf=3.8.0
ARG protobuf=3.9.1
ARG gogoprotobuf=1.3.0

# install protobuf(protoc).
RUN wget -q https://github.com/protocolbuffers/protobuf/releases/download/v$protobuf/protoc-$protobuf-linux-x86_64.zip -O /tmp/protobuf.zip && \
mkdir /tmp/protobuf && \
unzip /tmp/protobuf.zip -d /tmp/protobuf && \
mv /tmp/protobuf/bin/* /usr/local/bin/ && \
mv /tmp/protobuf/include/* /usr/local/include/ && \
rm -rf /tmp/*
rm -rf /tmp/protobuf

RUN cd /tmp/ && \
git clone https://github.com/krhubert/protobuf.git && \
cd protobuf && \
make install && \
mkdir -p /usr/local/include/gogo/protobuf/ && \
cp gogoproto/gogo.proto /usr/local/include/gogo/protobuf/

# download gogo proto files
RUN mkdir -p /usr/local/include/gogo/protobuf/ && \
wget -qO- https://github.com/gogo/protobuf/archive/v1.2.1.tar.gz | tar -xzf - protobuf-1.2.1/gogoproto/gogo.proto && \
mv protobuf-1.2.1/gogoproto /usr/local/include/gogo/protobuf/
wget -qO- https://github.com/gogo/protobuf/archive/v${gogoprotobuf}.tar.gz | tar -xzf - protobuf-${gogoprotobuf}/gogoproto/gogo.proto && \
mv protobuf-${gogoprotobuf}/gogoproto /usr/local/include/gogo/protobuf/

RUN go install github.com/go-bindata/go-bindata/go-bindata
RUN go install github.com/golang/protobuf/protoc-gen-go
RUN go install github.com/gogo/protobuf/...
RUN go install github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc
RUN go install github.com/vektra/mockery/.../

Expand Down
34 changes: 15 additions & 19 deletions protobuf/api/event.pb.go

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

Loading

0 comments on commit b2dfe07

Please sign in to comment.