#!/usr/bin/make -f export VERSION := $(shell echo $(shell git describe --always --match "v*") | sed 's/^v//') # export TM_VERSION := $(shell go list -m github.com/cometbft/cometbft | sed 's:.* ::') export COMMIT := $(shell git log -1 --format='%H') BIN_DIR ?= $(GOPATH)/bin BUILD_DIR ?= $(CURDIR)/build PROJECT_NAME = $(shell git remote get-url origin | xargs basename -s .git) HTTPS_GIT := https://github.com/skip-mev/pob.git DOCKER := $(shell which docker) ############################################################################### ### Tests ### ############################################################################### test: @go test -v ./... .PHONY: test ############################################################################### ### Protobuf ### ############################################################################### protoVer=0.11.6 protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer) protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName) proto-all: proto-format proto-lint proto-gen proto-gen: @echo "Generating Protobuf files" @$(protoImage) sh ./scripts/protocgen.sh proto-format: @$(protoImage) find ./ -name "*.proto" -exec clang-format -i {} \; proto-lint: @$(protoImage) buf lint --error-format=json proto-check-breaking: @$(protoImage) buf breaking --against $(HTTPS_GIT)#branch=main proto-update-deps: @echo "Updating Protobuf dependencies" $(DOCKER) run --rm -v $(CURDIR)/proto:/workspace --workdir /workspace $(protoImageName) buf mod update .PHONY: proto-all proto-gen proto-format proto-lint proto-check-breaking proto-update-deps