-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (27 loc) · 849 Bytes
/
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
.PHONY: test build docker-build docker-build-multi-arch vet vendor build-clear clear
IMG ?= kubecube-e2e:latest
MULTI_ARCH ?= true
test:
go test ./e2e -v
build: vet
ifeq ($(MULTI_ARCH),true)
CGO_ENABLED=0 GOOS=linux GO111MODULE=on go test -mod=vendor -c -o cube.test ./e2e
else
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go test -mod=vendor -c -o cube.test ./e2e
endif
docker-build:
docker build -f ./Dockerfile -t ${IMG} .
docker-push: ## Push docker image with the manager.
docker push ${IMG}
vet:
go vet ./...
vendor:
go mod vendor
build-clear: vet
ifeq ($(MULTI_ARCH),true)
CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -mod=vendor -o cube.clear cmd/clear/main.go
else
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -mod=vendor -o cube.clear cmd/clear/main.go
endif
clear: build-clear
./cube.clear