Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: extract buf version (backport #1327) #1355

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ BUILD_FLAGS = -mod=readonly -ldflags "$(LD_FLAGS)"
HTTPS_GIT := https://github.com/cometbft/cometbft.git
CGO_ENABLED ?= 0

BUF_VERSION := v1.31.0
# handle nostrip
ifeq (,$(findstring nostrip,$(COMETBFT_BUILD_OPTIONS)))
BUILD_FLAGS += -trimpath
Expand Down Expand Up @@ -154,7 +155,11 @@ endif

proto-gen: check-proto-deps
@echo "Generating Protobuf files"
<<<<<<< HEAD
@go run github.com/bufbuild/buf/cmd/buf@v1.29.0 generate
=======
@go run github.com/bufbuild/buf/cmd/buf@$(BUF_VERSION) generate
>>>>>>> b67d79ecb (chore: extract buf version (#1327))
@mv ./proto/tendermint/abci/types.pb.go ./abci/types/
@cp ./proto/tendermint/rpc/grpc/types.pb.go ./rpc/grpc
.PHONY: proto-gen
Expand All @@ -163,7 +168,11 @@ proto-gen: check-proto-deps
# execution only.
proto-lint: check-proto-deps
@echo "Linting Protobuf files"
<<<<<<< HEAD
@go run github.com/bufbuild/buf/cmd/buf@v1.29.0 lint
=======
@go run github.com/bufbuild/buf/cmd/buf@$(BUF_VERSION) lint
>>>>>>> b67d79ecb (chore: extract buf version (#1327))
.PHONY: proto-lint

proto-format: check-proto-format-deps
Expand All @@ -176,11 +185,19 @@ proto-check-breaking: check-proto-deps
@echo "Note: This is only useful if your changes have not yet been committed."
@echo " Otherwise read up on buf's \"breaking\" command usage:"
@echo " https://docs.buf.build/breaking/usage"
<<<<<<< HEAD
@go run github.com/bufbuild/buf/cmd/buf@v1.29.0 breaking --against ".git"
.PHONY: proto-check-breaking

proto-check-breaking-ci:
@go run github.com/bufbuild/buf/cmd/buf@v1.29.0 breaking --against $(HTTPS_GIT)#branch=v0.34.x-celestia
=======
@go run github.com/bufbuild/buf/cmd/buf@$(BUF_VERSION) breaking --against ".git"
.PHONY: proto-check-breaking

proto-check-breaking-ci:
@go run github.com/bufbuild/buf/cmd/buf@$(BUF_VERSION) breaking --against $(HTTPS_GIT)#branch=v0.34.x-celestia
>>>>>>> b67d79ecb (chore: extract buf version (#1327))
.PHONY: proto-check-breaking-ci

###############################################################################
Expand Down
Loading