-
Notifications
You must be signed in to change notification settings - Fork 15
/
Makefile
64 lines (48 loc) · 1.33 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
59
60
61
62
63
64
FEATURES?=
.PHONY: install-frontend
install-frontend:
cd web && npm install
.PHONY: install-frontend-ci
install-frontend-ci:
cd web && npm ci
.PHONY: install-frontend-ci-clean
install-frontend-ci-clean: install-frontend-ci
cd web && npm cache clean --force
.PHONY: lint-frontend
lint-frontend:
cd web && npm run lint
.PHONY: test-unit-frontend
test-unit-frontend:
cd web && npm run test:unit
.PHONY: build-frontend-standalone
build-frontend-standalone:
cd web && npm run build:standalone
.PHONY: test-frontend
test-frontend: test-unit-frontend build-frontend-standalone
cd web && npm run test
.PHONY: build-frontend
build-frontend:
cd web && npm run build
.PHONY: install-backend
install-backend:
go mod download
.PHONY: build-backend
build-backend:
go build $(BUILD_OPTS) -mod=readonly -o plugin-backend -mod=readonly cmd/plugin-backend.go
.PHONY: test-unit-backend
test-unit-backend:
go test ./...
.PHONY: start-console
start-console:
cd web && ./scripts/start-console.sh
.PHONY: install
install: install-backend build-backend install-frontend
.PHONY: start-frontend
start-frontend:
cd web && npm run dev
.PHONY: start-backend
start-backend: build-backend
./plugin-backend -port 9002 -features "$(FEATURES)"
.PHONY: build-image
build-image: install-backend build-backend install-frontend build-frontend
./scripts/image.sh -t latest