-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
46 lines (30 loc) · 683 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
43
44
45
46
APP = trigger
OUTPUT_DIR ?= _output
CMD = ./cmd/$(APP)/...
PKG = ./pkg/...
BIN ?= $(OUTPUT_DIR)/$(APP)
KO_DOCKER_REPO ?= ghcr.io/otaviof
KO_DEPLOY_DIR ?= deploy/
GOFLAGS ?= -v -mod=vendor
GOFLAGS_TEST ?= -race -cover
ARGS ?=
.EXPORT_ALL_VARIABLES:
.PHONY: $(BIN)
$(BIN):
go build -o $(BIN) $(CMD)
build: $(BIN)
default: build
build-image:
ko publish --base-import-paths $(CMD)
install:
ko apply --base-import-paths --recursive --filename $(KO_DEPLOY_DIR)
clean:
rm -rf "$(OUTPUT_DIR)" || true
run:
go run $(CMD) $(ARGS)
test: test-unit test-e2e
.PHONY: test-unit
test-unit:
go test $(GOFLAGS_TEST) $(CMD) $(PKG) $(ARGS)
install-tekton:
./hack/install-tekton.sh