Skip to content

Commit

Permalink
fix makefile
Browse files Browse the repository at this point in the history
Signed-off-by: Zbynek Roubalik <[email protected]>
  • Loading branch information
zroubalik committed Nov 10, 2022
1 parent 007b14f commit ff20d69
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,9 @@ clientset-verify: ## Verify that generated client-go clientset, listers and info
clientset-generate: ## Generate client-go clientset, listers and informers.
./hack/update-codegen.sh

proto-gen: ## Generate Liiklus, ExternalScaler and MetricsService proto
protoc -I vendor --proto_path=hack LiiklusService.proto --go_out=pkg/scalers/liiklus --go-grpc_out=pkg/scalers/liiklus
protoc -I vendor --proto_path=pkg/scalers/externalscaler externalscaler.proto --go_out=pkg/scalers/externalscaler --go-grpc_out=pkg/scalers/externalscaler
proto-gen: protoc-gen ## Generate Liiklus, ExternalScaler and MetricsService proto
GOBIN=$(LOCALBIN) protoc -I vendor --proto_path=hack LiiklusService.proto --go_out=pkg/scalers/liiklus --go-grpc_out=pkg/scalers/liiklus
GOBIN=$(LOCALBIN) protoc -I vendor --proto_path=pkg/scalers/externalscaler externalscaler.proto --go_out=pkg/scalers/externalscaler --go-grpc_out=pkg/scalers/externalscaler

.PHONY: mockgen-gen
mockgen-gen: mockgen pkg/mock/mock_scaling/mock_interface.go pkg/mock/mock_scaler/mock_scaler.go pkg/mock/mock_scale/mock_interfaces.go pkg/mock/mock_client/mock_interfaces.go pkg/scalers/liiklus/mocks/mock_liiklus.go
Expand Down Expand Up @@ -264,6 +264,8 @@ KUSTOMIZE ?= $(LOCALBIN)/kustomize
CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen
ENVTEST ?= $(LOCALBIN)/setup-envtest
MOCKGEN ?= $(LOCALBIN)/mockgen
PROTOCGEN ?= $(LOCALBIN)/protoc-gen-go
PROTOCGEN_GRPC ?= $(LOCALBIN)/protoc-gen-go-grpc

.PHONY: controller-gen
controller-gen: $(CONTROLLER_GEN) ## Install controller-gen from vendor dir if necessary.
Expand All @@ -285,6 +287,13 @@ mockgen: $(MOCKGEN) ## Install mockgen from vendor dir if necessary.
$(MOCKGEN): $(LOCALBIN)
test -s $(LOCALBIN)/mockgen || GOBIN=$(LOCALBIN) go install github.com/golang/mock/mockgen

.PHONY: protoc-gen
protoc-gen: $(PROTOCGEN) $(PROTOCGEN_GRPC) ## Install protoc-gen from vendor dir if necessary.
$(PROTOCGEN): $(LOCALBIN)
GOBIN=$(LOCALBIN) go install google.golang.org/protobuf/cmd/protoc-gen-go
$(PROTOCGEN_GRPC): $(LOCALBIN)
GOBIN=$(LOCALBIN) go install google.golang.org/grpc/cmd/protoc-gen-go-grpc


##################################################
# General #
Expand Down

0 comments on commit ff20d69

Please sign in to comment.