Skip to content

Commit

Permalink
Use protoc provided by Shipyard
Browse files Browse the repository at this point in the history
This avoids relying on a manually-maintained version.

Signed-off-by: Stephen Kitt <[email protected]>
  • Loading branch information
skitt authored and tpantelis committed Dec 11, 2024
1 parent d6dd2f9 commit 0df358d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
9 changes: 1 addition & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
BASE_BRANCH ?= devel
export BASE_BRANCH
PROTOC_VERSION=3.17.3

# Running in Dapper
ifneq (,$(DAPPER_HOST_ARCH))
Expand Down Expand Up @@ -53,19 +52,13 @@ golangci-lint: pkg/natdiscovery/proto/natdiscovery.pb.go

unit: pkg/natdiscovery/proto/natdiscovery.pb.go

%.pb.go: %.proto bin/protoc-gen-go bin/protoc
%.pb.go: %.proto bin/protoc-gen-go
PATH="$(CURDIR)/bin:$$PATH" protoc --go_out=$$(go env GOPATH)/src $<

bin/protoc-gen-go:
mkdir -p $(@D)
GOFLAGS="" GOBIN="$(CURDIR)/bin" go install google.golang.org/protobuf/cmd/protoc-gen-go@$(shell awk '/google.golang.org\/protobuf/ {print $$2}' go.mod)

bin/protoc:
curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v$(PROTOC_VERSION)/protoc-$(PROTOC_VERSION)-linux-x86_64.zip
sha256sum -c scripts/protoc.sha256
unzip protoc-$(PROTOC_VERSION)-linux-x86_64.zip 'bin/*' 'include/*'
rm -f protoc-$(PROTOC_VERSION)-linux-x86_64.zip

bin/%/submariner-gateway: main.go $(shell find pkg -not \( -path 'pkg/globalnet*' -o -path 'pkg/routeagent*' -o -path 'pkg/await_node_ready*' \)) pkg/natdiscovery/proto/natdiscovery.pb.go
GOARCH=$(call dockertogoarch,$(patsubst bin/linux/%/,%,$(dir $@))) ${SCRIPTS_DIR}/compile.sh $@ .

Expand Down
2 changes: 1 addition & 1 deletion pkg/natdiscovery/proto/natdiscovery.pb.go

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

1 change: 0 additions & 1 deletion scripts/protoc.sha256

This file was deleted.

0 comments on commit 0df358d

Please sign in to comment.