do not download protobuf stuff on offline builds

Signed-off-by: Christian Goll <cgoll@suse.com>
This commit is contained in:
Christian Goll
2023-09-20 15:01:23 +02:00
parent d5c1e7b520
commit a152beec49

View File

@@ -151,15 +151,16 @@ reference: wwctl
latexpdf: reference latexpdf: reference
make -C userdocs latexpdf make -C userdocs latexpdf
ifndef OFFLINE_BUILD
proto = internal/pkg/api/routes/wwapiv1/routes.pb.go \ protofiles = internal/pkg/api/routes/wwapiv1/routes.pb.go \
internal/pkg/api/routes/wwapiv1/routes.pb.gw.go \ internal/pkg/api/routes/wwapiv1/routes.pb.gw.go \
internal/pkg/api/routes/wwapiv1/routes_grpc.pb.go internal/pkg/api/routes/wwapiv1/routes_grpc.pb.go
.PHONY: proto .PHONY: proto
proto: $(proto)
proto: $(protofiles)
routes_proto = internal/pkg/api/routes/v1/routes.proto routes_proto = internal/pkg/api/routes/v1/routes.proto
internal/pkg/api/routes/wwapiv1/%.go: $(PROTOC) $(PROTOC_GEN_GRPC_GATEWAY) $(PROTOC_GEN_GO) $(PROTOC_GEN_GO_GRPC) $(routes_proto) $(protofiles): $(routes_proto) $(PROTOC) $(PROTOC_GEN_GRPC_GATEWAY) $(PROTOC_GEN_GO) $(PROTOC_GEN_GO_GRPC)
PATH=$(TOOLS_BIN):$(PATH) $(PROTOC) \ PATH=$(TOOLS_BIN):$(PATH) $(PROTOC) \
-I /usr/include -I $(shell dirname $(routes_proto)) -I=. \ -I /usr/include -I $(shell dirname $(routes_proto)) -I=. \
--grpc-gateway_opt logtostderr=true \ --grpc-gateway_opt logtostderr=true \
@@ -168,9 +169,11 @@ internal/pkg/api/routes/wwapiv1/%.go: $(PROTOC) $(PROTOC_GEN_GRPC_GATEWAY) $(PRO
--grpc-gateway_out=. \ --grpc-gateway_out=. \
routes.proto routes.proto
endif
.PHONY: cleanproto .PHONY: cleanproto
cleanproto: cleanproto:
rm -f $(proto) rm -f $(protofiles)
.PHONY: cleanconfig .PHONY: cleanconfig
cleanconfig: cleanconfig: