@@ -109,19 +109,10 @@ build: check-network print-ledger go.sum
109109install : check-network print-ledger go.sum
110110 @go install -mod=readonly $(BUILD_FLAGS ) ./cmd/cronosd
111111
112- test : test-memiavl test-store
112+ test :
113113 @go test -tags=objstore -v -mod=readonly $(PACKAGES ) -coverprofile=$(COVERAGE ) -covermode=atomic
114114
115- test-memiavl :
116- @cd memiavl; go test -tags=objstore -v -mod=readonly ./... -coverprofile=$(COVERAGE ) -covermode=atomic;
117-
118- test-store :
119- @cd store; go test -tags=objstore -v -mod=readonly ./... -coverprofile=$(COVERAGE ) -covermode=atomic;
120-
121- test-versiondb :
122- @cd versiondb; go test -tags=objstore,rocksdb -v -mod=readonly ./... -coverprofile=$(COVERAGE ) -covermode=atomic;
123-
124- .PHONY : clean build install test test-memiavl test-store test-versiondb
115+ .PHONY : all clean build install test
125116
126117clean :
127118 rm -rf $(BUILDDIR ) /
@@ -297,6 +288,21 @@ endif
297288# ##############################################################################
298289
299290HTTPS_GIT := https://github.com/crypto-org-chain/cronos.git
291+ CRONOS_STORE_GIT := https://github.com/crypto-org-chain/cronos-store.git
292+ CRONOS_STORE_VERSION := $(shell go list -m -f '{{if .Replace}}{{.Replace.Version}}{{else}}{{.Version}}{{end}}' github.com/crypto-org-chain/cronos-store/memiavl 2>/dev/null)
293+ ifeq ($(CRONOS_STORE_VERSION ) ,)
294+ CRONOS_STORE_VERSION := $(shell awk '/^[[:space:]]* github.com\/crypto-org-chain\/cronos-store\/memiavl[[:space:]]+=>/ {print $$NF; exit}' go.mod)
295+ endif
296+ ifeq ($(CRONOS_STORE_VERSION ) ,)
297+ CRONOS_STORE_VERSION := $(shell sed -nE -e '/=>/d' -e 's/^[[:space:]]* github.com\/crypto-org-chain\/cronos-store\/memiavl[[:space:]]+([^[:space:]]+) .*/\1/p' go.mod | head -n 1)
298+ endif
299+ CRONOS_STORE_REF := $(CRONOS_STORE_VERSION )
300+ ifneq (,$(findstring -, $(CRONOS_STORE_VERSION ) ) )
301+ CRONOS_STORE_REF := $(shell echo $(CRONOS_STORE_VERSION ) | awk -F- '{print $$NF}')
302+ endif
303+ ifeq ($(CRONOS_STORE_REF ) ,)
304+ CRONOS_STORE_REF := main
305+ endif
300306protoVer =0.14.0
301307protoImageName =ghcr.io/cosmos/proto-builder:$(protoVer )
302308protoImageCi =$(DOCKER ) run --rm -v $(CURDIR ) :/workspace --workdir /workspace --user root $(protoImageName )
@@ -329,8 +335,10 @@ proto-format:
329335 @$(protoImage ) find ./ -not -path " ./third_party/*" -name " *.proto" -exec clang-format -i {} \;
330336
331337proto-check-breaking :
332- @echo " Checking Protobuf files for breaking changes"
333- @$(protoImage ) buf breaking --against $(HTTPS_GIT ) # branch=main
338+ @echo " Checking Cronos protobuf files for breaking changes"
339+ @$(protoImage ) buf breaking --against $(HTTPS_GIT ) # branch=main --exclude-path proto/memiavl
340+ @echo " Checking memiavl protobuf files against cronos-store ref $( CRONOS_STORE_REF) "
341+ @$(protoImage ) buf breaking --path proto/memiavl --against $(CRONOS_STORE_GIT ) # ref=$(CRONOS_STORE_REF) || echo "Warning: memiavl proto check skipped (files may not exist in cronos-store yet)"
334342
335343
336344.PHONY : proto-all proto-gen proto-format proto-lint proto-check-breaking
0 commit comments