forked from kubeflow/katib
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
59 lines (47 loc) · 1.39 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
HAS_DEP := $(shell command -v dep;)
HAS_LINT := $(shell command -v golint;)
# Run tests
.PHONY: test
test:
go test ./pkg/... ./cmd/... -coverprofile coverage.out
depend:
ifndef HAS_DEP
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
endif
dep ensure -v
check: depend generate fmt vet lint
fmt:
hack/verify-gofmt.sh
lint:
ifndef HAS_LINT
go get -u golang.org/x/lint/golint
echo "installing golint"
endif
hack/verify-golint.sh
vet:
go vet ./pkg/... ./cmd/...
update:
hack/update-gofmt.sh
# Deploy Katib v1beta1 manifests into a k8s cluster
deploy:
bash scripts/v1beta1/deploy.sh
# Undeploy Katib v1beta1 manifests from a k8s cluster
undeploy:
bash scripts/v1beta1/undeploy.sh
# Generate deepcopy, clientset, listers, informers, open-api and python SDK for APIs.
# Run this if you update any existing controller APIs.
generate:
ifndef GOPATH
$(error GOPATH not defined, please define GOPATH. Run "go help gopath" to learn more about GOPATH)
endif
go generate ./pkg/... ./cmd/...
hack/gen-python-sdk/gen-sdk.sh
# Build images for Katib v1beta1 components
build: depend generate
ifeq ($(and $(REGISTRY),$(TAG)),)
$(error REGISTRY and TAG must be set. Usage make build REGISTRY=<registry> TAG=<TAG>)
endif
bash scripts/v1beta1/build.sh -r $(REGISTRY) -t $(TAG)
# Prettier UI format check for Katib v1beta1
prettier-check:
npm run format:check --prefix pkg/ui/v1beta1/frontend