Skip to content

Commit

Permalink
Merge pull request #2075 from lebauce/pin-protobuf
Browse files Browse the repository at this point in the history
Makefile: pin github.com/golang/protobuf and github.com/gogo/protobuf
  • Loading branch information
safchain authored Nov 15, 2019
2 parents 70e0356 + a83eba0 commit df06f79
Show file tree
Hide file tree
Showing 20 changed files with 1,471 additions and 378 deletions.
6 changes: 3 additions & 3 deletions .mk/api.mk
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
.typescript: statics/js/bundle.js js/browser.js js/api.js

js/api.js: js/api.ts
cd js && npm install && PATH=`npm bin`:$$PATH tsc --module commonjs --target ES5 api.ts
cd js && npm ci && PATH=`npm bin`:$$PATH tsc --module commonjs --target ES5 api.ts

js/browser.js: js/browser.ts js/api.ts
cd js && npm install && PATH=`npm bin`:$$PATH tsc --module commonjs --target ES5 browser.ts
cd js && npm ci && PATH=`npm bin`:$$PATH tsc --module commonjs --target ES5 browser.ts

statics/js/bundle.js: js/browser.js
cd js && PATH=`npm bin`:$$PATH browserify browser.js -o ../statics/js/bundle.js

.PHONY: .typescript.clean
.typescript.clean:
make -C js clean
rm -f statics/js/bundle.js js/browser.js js/api.js
5 changes: 1 addition & 4 deletions .mk/bindata.mk
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
STATIC_FILES=$(shell find statics -type f \( ! -iname "bindata.go" ! -iname "bundle.js" \))
GO_BINDATA_GITHUB:=github.com/jteeuwen/go-bindata/go-bindata
EXTRABINDATA:=

EBPF_PROBES:=
ifeq ($(WITH_EBPF), true)
EXTRABINDATA+=ebpf/*.o
EBPF_PROBES+=ebpf/flow.o ebpf/flow-gre.o
endif

Expand All @@ -18,8 +16,7 @@ BINDATA_DIRS := \
statics/img/* \
statics/js/* \
statics/schemas/* \
statics/workflows/*.yaml \
${EXTRABINDATA}
statics/workflows/*.yaml

.PHONY: .bindata
.bindata: statics/bindata.go ebpf/statics/bindata.go
Expand Down
6 changes: 3 additions & 3 deletions .mk/check.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ vet:
.PHONY: check
check: lint
# check if Go modules are in sync
# $(GO) mod tidy
# @test -z "$$(git diff go.mod go.sum)" || \
# (echo -e "Go modules of sync:\n$$(git diff go.mod go.sum)" && /bin/false)
$(GO) mod tidy
@test -z "$$(git diff)" || \
(echo -e "Repository is altered after build:\n$$(git diff)" && /bin/false)
nbnotcomment=$$(grep '"linter":"golint"' lint.json | wc -l); \
if [ $$nbnotcomment -gt 0 ]; then \
cat lint.json; \
Expand Down
9 changes: 3 additions & 6 deletions .mk/proto.mk
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
PROTOC_GEN_GO_GITHUB:=github.com/golang/protobuf/protoc-gen-go
PROTOC_GEN_GOFAST_GITHUB:=github.com/gogo/protobuf/protoc-gen-gogofaster

define PROTOC_GEN
go get -u ${PROTOC_GEN_GOFAST_GITHUB}
go get -u ${PROTOC_GEN_GO_GITHUB}
protoc -I. -Iflow/layers -I$${GOPATH}/pkg/mod/github.com/gogo/[email protected].0 --plugin=$${GOPATH}/bin/protoc-gen-gogofaster --gogofaster_out $$GOPATH/src $1
go get github.com/gogo/protobuf/[email protected]
go get github.com/golang/protobuf/[email protected]
protoc -I. -Iflow/layers -I$${GOPATH}/pkg/mod/github.com/gogo/[email protected].1 --plugin=$${GOPATH}/bin/protoc-gen-gogofaster --gogofaster_out $$GOPATH/src $1
endef

GEN_PROTO_FILES = $(patsubst %.proto,%.pb.go,$(shell find . -name *.proto | grep -v ^./vendor))
Expand Down
101 changes: 97 additions & 4 deletions api/types/types_easyjson.go

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

58 changes: 16 additions & 42 deletions filters/filters.pb.go

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

Loading

0 comments on commit df06f79

Please sign in to comment.