@@ -15,8 +15,8 @@ ADD_LICENSE_HEADER := $(BIN)/license-header \
1515 --license-type apache \
1616 --copyright-holder "Buf Technologies, Inc." \
1717 --year-range "2023-2025"
18- # This version should be kept in sync with the version in buf.yaml
19- PROTOVALIDATE_VERSION ?= v0.14.0
18+ # This version should be kept in sync with the version in buf.yaml and the bufbuild-protovalidate-protocolbuffers version in uv.lock
19+ PROTOVALIDATE_TESTING_VERSION ?= v0.14.0
2020# Version of the cel-spec that this implementation is conformant with
2121# This should be kept in sync with the version in test/test_format.py
2222CEL_SPEC_VERSION ?= v0.24.0
@@ -35,14 +35,14 @@ clean: ## Delete intermediate build artifacts
3535 git clean -Xdf
3636
3737.PHONY : generate
38- generate : generate-protovalidate-pypi-package generate- protobuf-tests $(BIN ) /license-header # # Regenerate code and license headers
38+ generate : generate-protobuf-tests $(BIN ) /license-header # # Regenerate code and license headers
3939 $(ADD_LICENSE_HEADER )
4040
4141.PHONY : generate-protobuf-tests
4242generate-protobuf-tests : $(BIN ) /buf # # Regenerate protobuf gencode used in unit tests
4343 rm -rf test/gen
4444 # generate protovalidate-testing into test/gen/buf/validate
45- $(BIN ) /buf generate buf.build/bufbuild/protovalidate-testing:$(PROTOVALIDATE_VERSION )
45+ $(BIN ) /buf generate buf.build/bufbuild/protovalidate-testing:$(PROTOVALIDATE_TESTING_VERSION )
4646
4747 # generate cel-spec into test/gen/cel/expr
4848 $(BIN ) /buf generate buf.build/google/cel-spec:$(CEL_SPEC_VERSION ) --exclude-path cel/expr/conformance/proto2 --exclude-path cel/expr/conformance/proto3
@@ -52,16 +52,6 @@ generate-protobuf-tests: $(BIN)/buf ## Regenerate protobuf gencode used in unit
5252 # generate proto/tests/example/v1/validations.proto into test/gen/tests/example/v1
5353 $(BIN)/buf generate
5454
55- .PHONY :
56- generate-protovalidate-pypi-package : $(BIN ) /buf # # Regenerate protobuf gencode for the bufbuild-protovalidate-protocolbuffers pypi package
57- rm -rf bufbuild-protovalidate-protocolbuffers/buf/validate/proto5
58- rm -rf bufbuild-protovalidate-protocolbuffers/buf/validate/proto6
59- # generate gencode for both proto5 and proto6 for buf.build/bufbuild/protovalidate
60- cd bufbuild-protovalidate-protocolbuffers && ../$(BIN ) /buf generate buf.build/bufbuild/protovalidate:$(PROTOVALIDATE_VERSION )
61-
62- # set the version of bufbuild-protovalidate-protocolbuffers to the used PROTOVALIDATE_VERSION
63- sed -i .bak 's/^version = "[^"]*"/version = "$(PROTOVALIDATE_VERSION)"/' bufbuild-protovalidate-protocolbuffers/pyproject.toml && rm bufbuild-protovalidate-protocolbuffers/pyproject.toml.bak
64-
6555.PHONY : format
6656format : install $(BIN ) /buf $(BIN ) /license-header # # Format code
6757 $(ADD_LICENSE_HEADER )
0 commit comments