generated from knative-extensions/sample-controller
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (31 loc) · 1.09 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
BIN_DIR=_output/bin
# If tag not explicitly set in users default to the git sha.
TAG ?= v0.0.1
# If namespace not explicitly set in default tekton pipelines.
NAMESPACE ?= tekton-pipelines
.EXPORT_ALL_VARIABLES:
all: local
init:
mkdir -p ${BIN_DIR}
local: init
go build -o=${BIN_DIR}/code-engine-controller ./cmd/controller
go build -o=${BIN_DIR}/code-engine-webhook ./cmd/webhook
build-linux: init
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o=${BIN_DIR}/code-engine-controller ./cmd/controller
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o=${BIN_DIR}/code-engine-webhook ./cmd/webhook
images: build-linux
docker build --build-arg bin_name=code-engine-controller . -t rafalbigaj/code-engine-controller:$(TAG)
docker build --build-arg bin_name=code-engine-webhook . -t rafalbigaj/code-engine-webhook:$(TAG)
update:
go mod download
go mod tidy
go mod vendor
clean:
rm -rf _output/
rm -f *.log
use-docker-daemon:
eval $(minikube docker-env)
ko-local-apply: use-docker-daemon
ko apply -n $(NAMESPACE) -f config --local
ko-delete: use-docker-daemon
ko delete -n $(NAMESPACE) -f config