forked from open-cluster-management-io/clusteradm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
58 lines (42 loc) · 1.24 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
# Copyright Contributors to the Open Cluster Management project
BEFORE_SCRIPT := $(shell build/before-make.sh)
SCRIPTS_PATH ?= build
# Install software dependencies
INSTALL_DEPENDENCIES ?= ${SCRIPTS_PATH}/install-dependencies.sh
GOPATH := ${shell go env GOPATH}
export PROJECT_DIR = $(shell 'pwd')
export PROJECT_NAME = $(shell basename ${PROJECT_DIR})
export GOPACKAGES = $(shell go list ./... | grep -v /vendor | grep -v /build | grep -v /test )
.PHONY: clean
clean: clean-test
kind delete cluster --name ${PROJECT_NAME}-functional-test
.PHONY: deps
deps:
@$(INSTALL_DEPENDENCIES)
.PHONY: build
build:
go install ./cmd/clusteradm.go
.PHONY: install
install: build
.PHONY: plugin
plugin: build
cp ${GOPATH}/bin/clusteradm ${GOPATH}/bin/oc-clusteradm
cp ${GOPATH}/bin/clusteradm ${GOPATH}/bin/kubectl-clusteradm
.PHONY: check
## Runs a set of required checks
check: check-copyright
.PHONY: check-copyright
check-copyright:
@build/check-copyright.sh
.PHONY: test
test:
@build/run-unit-tests.sh
.PHONY: clean-test
clean-test:
-rm -r ./test/unit/coverage
-rm -r ./test/unit/tmp
-rm -r ./test/functional/tmp
-rm -r ./test/out
.PHONY: functional-test-full
functional-test-full: deps install
@build/run-functional-tests.sh