Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mybee
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
mybee
Commits
5e875a6f
Unverified
Commit
5e875a6f
authored
May 19, 2020
by
Janoš Guljaš
Committed by
GitHub
May 19, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add protobuf Makefile rule (#194)
parent
14fe4836
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
Makefile
Makefile
+12
-0
README.md
README.md
+13
-0
No files found.
Makefile
View file @
5e875a6f
GO
?=
go
GOLANGCI_LINT
?=
golangci-lint
GOLANGCI_LINT_VERSION
?=
v1.24.0
GOGOPROTOBUF
?=
protoc-gen-gogofaster
GOGOPROTOBUF_VERSION
?=
v1.3.1
LDFLAGS
?=
-s
-w
ifdef
COMMIT
...
...
@@ -48,6 +50,16 @@ build:
githooks
:
ln
-f
-s
../../.githooks/pre-push.bash .git/hooks/pre-push
.PHONY
:
protobuftools
protobuftools
:
which protoc
||
(
echo
"install protoc for your system from https://github.com/protocolbuffers/protobuf/releases"
&&
exit
1
)
which
$(GOGOPROTOBUF)
||
(
cd
/tmp
&&
GO111MODULE
=
on
$(GO)
get
-u
github.com/gogo/protobuf/
$(GOGOPROTOBUF)
@
$(GOGOPROTOBUF_VERSION)
)
.PHONY
:
protobuf
protobuf
:
GOFLAGS=-mod=mod
#
use modules for protobuf file include option
protobuf
:
protobuftools
$(GO)
generate
-run
protoc ./...
.PHONY
:
clean
clean
:
$(GO)
clean
...
...
README.md
View file @
5e875a6f
...
...
@@ -158,6 +158,19 @@ And use that address in the API call on another node, for example, local node 1:
curl
-XPOST
localhost:8081/pingpong/d4440baf2d79e481c3c6fd93a2014d2e6fe0386418829439f26d13a8253d04f1
```
## Generating protobuf
To process protocol buffer files and generate the Go code from it two tools are needed:
-
protoc - https://github.com/protocolbuffers/protobuf/releases
-
protoc-gen-gogofaster - https://github.com/gogo/protobuf
Makefile rule
`protobuf`
can be used to automate
`protoc-gen-gogofaster`
installation and code generation:
```
sh
make protobuf
```
## Contributing
Please read the
[
coding guidelines
](
CODING.md
)
.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment