Skip to content

Commit df06f79

Browse files
authored
Merge pull request #2075 from lebauce/pin-protobuf
Makefile: pin github.com/golang/protobuf and github.com/gogo/protobuf
2 parents 70e0356 + a83eba0 commit df06f79

File tree

20 files changed

+1471
-378
lines changed

20 files changed

+1471
-378
lines changed

.mk/api.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
.typescript: statics/js/bundle.js js/browser.js js/api.js
22

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

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

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

1212
.PHONY: .typescript.clean
1313
.typescript.clean:
14-
make -C js clean
14+
rm -f statics/js/bundle.js js/browser.js js/api.js

.mk/bindata.mk

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
STATIC_FILES=$(shell find statics -type f \( ! -iname "bindata.go" ! -iname "bundle.js" \))
22
GO_BINDATA_GITHUB:=github.com/jteeuwen/go-bindata/go-bindata
3-
EXTRABINDATA:=
43

54
EBPF_PROBES:=
65
ifeq ($(WITH_EBPF), true)
7-
EXTRABINDATA+=ebpf/*.o
86
EBPF_PROBES+=ebpf/flow.o ebpf/flow-gre.o
97
endif
108

@@ -18,8 +16,7 @@ BINDATA_DIRS := \
1816
statics/img/* \
1917
statics/js/* \
2018
statics/schemas/* \
21-
statics/workflows/*.yaml \
22-
${EXTRABINDATA}
19+
statics/workflows/*.yaml
2320

2421
.PHONY: .bindata
2522
.bindata: statics/bindata.go ebpf/statics/bindata.go

.mk/check.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ vet:
2020
.PHONY: check
2121
check: lint
2222
# check if Go modules are in sync
23-
# $(GO) mod tidy
24-
# @test -z "$$(git diff go.mod go.sum)" || \
25-
# (echo -e "Go modules of sync:\n$$(git diff go.mod go.sum)" && /bin/false)
23+
$(GO) mod tidy
24+
@test -z "$$(git diff)" || \
25+
(echo -e "Repository is altered after build:\n$$(git diff)" && /bin/false)
2626
nbnotcomment=$$(grep '"linter":"golint"' lint.json | wc -l); \
2727
if [ $$nbnotcomment -gt 0 ]; then \
2828
cat lint.json; \

.mk/proto.mk

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
PROTOC_GEN_GO_GITHUB:=github.com/golang/protobuf/protoc-gen-go
2-
PROTOC_GEN_GOFAST_GITHUB:=github.com/gogo/protobuf/protoc-gen-gogofaster
3-
41
define PROTOC_GEN
5-
go get -u ${PROTOC_GEN_GOFAST_GITHUB}
6-
go get -u ${PROTOC_GEN_GO_GITHUB}
7-
protoc -I. -Iflow/layers -I$${GOPATH}/pkg/mod/github.com/gogo/protobuf@v1.3.0 --plugin=$${GOPATH}/bin/protoc-gen-gogofaster --gogofaster_out $$GOPATH/src $1
2+
go get github.com/gogo/protobuf/protoc-gen-gogofaster@v1.3.1
3+
go get github.com/golang/protobuf/protoc-gen-go@v1.3.2
4+
protoc -I. -Iflow/layers -I$${GOPATH}/pkg/mod/github.com/gogo/protobuf@v1.3.1 --plugin=$${GOPATH}/bin/protoc-gen-gogofaster --gogofaster_out $$GOPATH/src $1
85
endef
96

107
GEN_PROTO_FILES = $(patsubst %.proto,%.pb.go,$(shell find . -name *.proto | grep -v ^./vendor))

api/types/types_easyjson.go

Lines changed: 97 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

filters/filters.pb.go

Lines changed: 16 additions & 42 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)