-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Isabella do Amaral <[email protected]>
- Loading branch information
Showing
6 changed files
with
34 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) | ||
PROJECT_PATH := $(patsubst %/,%,$(dir $(MKFILE_PATH))) | ||
PROJECT_BIN := $(PROJECT_PATH)/bin | ||
GO := $(PROJECT_BIN)/go1.21.9 | ||
GO ?= "$(shell which go)" | ||
|
||
# add tools bin directory | ||
PATH := $(PROJECT_BIN):$(PATH) | ||
|
@@ -64,7 +64,7 @@ internal/ml_metadata/proto/%.pb.go: api/grpc/ml_metadata/proto/%.proto | |
gen/grpc: internal/ml_metadata/proto/metadata_store.pb.go internal/ml_metadata/proto/metadata_store_service.pb.go | ||
|
||
internal/converter/generated/converter.go: internal/converter/*.go | ||
${GOVERTER} gen github.com/kubeflow/model-registry/internal/converter/ | ||
goverter gen github.com/kubeflow/model-registry/internal/converter/ | ||
|
||
.PHONY: gen/converter | ||
gen/converter: gen/grpc internal/converter/generated/converter.go | ||
|
@@ -104,34 +104,23 @@ vet: | |
clean: | ||
rm -Rf ./model-registry internal/ml_metadata/proto/*.go internal/converter/generated/*.go pkg/openapi | ||
|
||
.PHONY: clean/odh | ||
clean/odh: | ||
.PHONY: clean/docker | ||
clean/docker: | ||
rm -Rf ./model-registry | ||
|
||
bin/go: | ||
GOBIN=$(PROJECT_BIN) go install golang.org/dl/go1.21.9@latest | ||
$(PROJECT_BIN)/go1.21.9 download | ||
|
||
bin/protoc: | ||
./scripts/install_protoc.sh | ||
|
||
bin/go-enum: | ||
GOBIN=$(PROJECT_BIN) ${GO} install github.com/searKing/golang/tools/[email protected] | ||
|
||
bin/protoc-gen-go: | ||
GOBIN=$(PROJECT_BIN) ${GO} install google.golang.org/protobuf/cmd/[email protected] | ||
|
||
bin/protoc-gen-go-grpc: | ||
GOBIN=$(PROJECT_BIN) ${GO} install google.golang.org/grpc/cmd/[email protected] | ||
go-deps: | ||
${GO} install github.com/searKing/golang/tools/[email protected] | ||
${GO} install google.golang.org/protobuf/cmd/[email protected] | ||
${GO} install google.golang.org/grpc/cmd/[email protected] | ||
${GO} install github.com/jmattheis/goverter/cmd/[email protected] | ||
|
||
GOLANGCI_LINT ?= ${PROJECT_BIN}/golangci-lint | ||
bin/golangci-lint: | ||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(PROJECT_BIN) v1.59.1 | ||
|
||
GOVERTER ?= ${PROJECT_BIN}/goverter | ||
bin/goverter: | ||
GOBIN=$(PROJECT_PATH)/bin ${GO} install github.com/jmattheis/goverter/cmd/[email protected] | ||
|
||
OPENAPI_GENERATOR ?= ${PROJECT_BIN}/openapi-generator-cli | ||
NPM ?= "$(shell which npm)" | ||
bin/openapi-generator-cli: | ||
|
@@ -155,19 +144,19 @@ clean/deps: | |
rm -Rf bin/* | ||
|
||
.PHONY: deps | ||
deps: bin/go bin/protoc bin/go-enum bin/protoc-gen-go bin/protoc-gen-go-grpc bin/golangci-lint bin/goverter bin/openapi-generator-cli | ||
deps: bin/protoc bin/golangci-lint bin/openapi-generator-cli | ||
|
||
.PHONY: vendor | ||
vendor: | ||
${GO} mod vendor | ||
|
||
.PHONY: build | ||
build: gen vet lint | ||
${GO} build -buildvcs=false | ||
${GO} build | ||
|
||
.PHONY: build/odh | ||
build/odh: vet | ||
${GO} build -buildvcs=false | ||
.PHONY: build/docker | ||
build/docker: vet | ||
${GO} build | ||
|
||
.PHONY: gen | ||
gen: deps gen/grpc gen/openapi gen/openapi-server gen/converter | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters