From 0df358dad16a33944a5546497f969ac2a94f2168 Mon Sep 17 00:00:00 2001 From: Stephen Kitt Date: Wed, 4 Dec 2024 11:00:32 +0100 Subject: [PATCH] Use protoc provided by Shipyard This avoids relying on a manually-maintained version. Signed-off-by: Stephen Kitt --- Makefile | 9 +-------- pkg/natdiscovery/proto/natdiscovery.pb.go | 2 +- scripts/protoc.sha256 | 1 - 3 files changed, 2 insertions(+), 10 deletions(-) delete mode 100644 scripts/protoc.sha256 diff --git a/Makefile b/Makefile index f0ec49891..cd5046220 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,5 @@ BASE_BRANCH ?= devel export BASE_BRANCH -PROTOC_VERSION=3.17.3 # Running in Dapper ifneq (,$(DAPPER_HOST_ARCH)) @@ -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 $@ . diff --git a/pkg/natdiscovery/proto/natdiscovery.pb.go b/pkg/natdiscovery/proto/natdiscovery.pb.go index 62757a01a..06e3ae12b 100644 --- a/pkg/natdiscovery/proto/natdiscovery.pb.go +++ b/pkg/natdiscovery/proto/natdiscovery.pb.go @@ -18,7 +18,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.35.1 -// protoc v3.17.3 +// protoc v3.19.6 // source: pkg/natdiscovery/proto/natdiscovery.proto package proto diff --git a/scripts/protoc.sha256 b/scripts/protoc.sha256 deleted file mode 100644 index 62573ec93..000000000 --- a/scripts/protoc.sha256 +++ /dev/null @@ -1 +0,0 @@ -d4246a5136cf9cd1abc851c521a1ad6b8884df4feded8b9cbd5e2a2226d4b357 protoc-3.17.3-linux-x86_64.zip