Skip to content

Commit

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

#### PR checklist

- [ ] 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 <rootulp@gmail.com>
  • Loading branch information
TropicalDog17 and rootulp authored May 10, 2024
1 parent 4aa0de0 commit b67d79e
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 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 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 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 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 b67d79e

Please sign in to comment.