generated from crossplane/provider-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
42 lines (29 loc) · 844 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
36
37
38
39
40
41
42
# Set the shell to bash always
SHELL := /bin/bash
# Options
ORG_NAME=crossplane
PROVIDER_NAME=provider-openstack
build: generate test
@CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o ./bin/$(PROVIDER_NAME)-controller cmd/provider/main.go
image: generate test
docker build . -t $(ORG_NAME)/$(PROVIDER_NAME):latest -f cluster/Dockerfile
image-push:
docker push $(ORG_NAME)/$(PROVIDER_NAME):latest
run: generate
kubectl apply -f package/crds/ -R
go run cmd/provider/main.go -d
all: image image-push
generate:
go generate -v ./...
@find package/crds -name *.yaml -exec sed -i.sed -e '1,2d' {} \;
@find package/crds -name *.yaml.sed -delete
lint:
$(LINT) run
tidy:
go mod tidy
test:
go test -v ./...
# Tools
KIND=$(shell which kind)
LINT=$(shell which golangci-lint)
.PHONY: generate tidy lint clean build image all run