Skip to content

Commit

Permalink
chore: extract buf version (#1327)
Browse files Browse the repository at this point in the history
Closes #1253

- [ ] Tests written/updated
- [ ] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [ ] Updated relevant documentation (`docs/` or `spec/`) and code
comments

---------

Co-authored-by: Rootul P <[email protected]>
  • Loading branch information
2 people authored and cmwaters committed Jul 30, 2024
1 parent 2a5a08e commit 204c883
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 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,7 @@ endif

proto-gen: check-proto-deps
@echo "Generating Protobuf files"
@go run github.com/bufbuild/buf/cmd/buf@v1.29.0 generate
@go run github.com/bufbuild/buf/cmd/buf@$(BUF_VERSION) generate
@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 +164,7 @@ proto-gen: check-proto-deps
# execution only.
proto-lint: check-proto-deps
@echo "Linting Protobuf files"
@go run github.com/bufbuild/buf/cmd/buf@v1.29.0 lint
@go run github.com/bufbuild/buf/cmd/buf@$(BUF_VERSION) lint
.PHONY: proto-lint

proto-format: check-proto-format-deps
Expand All @@ -176,11 +177,11 @@ 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"
@go run github.com/bufbuild/buf/cmd/buf@v1.29.0 breaking --against ".git"
@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@v1.29.0 breaking --against $(HTTPS_GIT)#branch=v0.34.x-celestia
@go run github.com/bufbuild/buf/cmd/buf@$(BUF_VERSION) breaking --against $(HTTPS_GIT)#branch=v0.34.x-celestia
.PHONY: proto-check-breaking-ci

###############################################################################
Expand Down

0 comments on commit 204c883

Please sign in to comment.