diff --git a/CHANGELOG.md b/CHANGELOG.md index db73c48d..670f5b03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,6 +38,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fix `wwctl profile list -a` format when kernerargs are set - Fix a rendering bug in the documentation for GRUB boot support. #1132 - Replace slice in templates with sprig substr. #1093 +- Don't attempt to rebuild protocol buffers in offline mode. #1155 ## [4.5.0] 2024-02-08 diff --git a/Makefile b/Makefile index 2a6d8bfb..be4a931e 100644 --- a/Makefile +++ b/Makefile @@ -160,25 +160,6 @@ reference: wwctl latexpdf: reference make -C userdocs latexpdf -protofiles = internal/pkg/api/routes/wwapiv1/routes.pb.go \ - internal/pkg/api/routes/wwapiv1/routes.pb.gw.go \ - internal/pkg/api/routes/wwapiv1/routes_grpc.pb.go -.PHONY: proto -proto: $(protofiles) - -routes_proto = internal/pkg/api/routes/v1/routes.proto -$(protofiles): $(routes_proto) - PATH=$(TOOLS_BIN):$(PATH) $(PROTOC) \ - -I /usr/include -I $(shell dirname $(routes_proto)) -I=. \ - --grpc-gateway_opt logtostderr=true \ - --go_out=. \ - --go-grpc_out=. \ - --grpc-gateway_out=. \ - routes.proto - -.PHONY: cleanproto -cleanproto: - rm -f $(protofiles) .PHONY: cleanconfig cleanconfig: @@ -231,7 +212,25 @@ dist: vendor lint: $(GOLANGCI_LINT) -$(protofiles): $(PROTOC) $(PROTOC_GEN_GRPC_GATEWAY) $(PROTOC_GEN_GO) $(PROTOC_GEN_GO_GRPC) +protofiles = internal/pkg/api/routes/wwapiv1/routes.pb.go \ + internal/pkg/api/routes/wwapiv1/routes.pb.gw.go \ + internal/pkg/api/routes/wwapiv1/routes_grpc.pb.go +.PHONY: proto +proto: $(protofiles) + +routes_proto = internal/pkg/api/routes/v1/routes.proto +$(protofiles): $(routes_proto) $(PROTOC) $(PROTOC_GEN_GRPC_GATEWAY) $(PROTOC_GEN_GO) $(PROTOC_GEN_GO_GRPC) + PATH=$(TOOLS_BIN):$(PATH) $(PROTOC) \ + -I /usr/include -I $(shell dirname $(routes_proto)) -I=. \ + --grpc-gateway_opt logtostderr=true \ + --go_out=. \ + --go-grpc_out=. \ + --grpc-gateway_out=. \ + routes.proto + +.PHONY: cleanproto +cleanproto: + rm -f $(protofiles) clean: cleanvendor endif