-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
88 lines (66 loc) · 1.25 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
@PHONY: all
all: clean install build copy-dist
linux: clean build-ui build-core-linux copy-dist
run-prod:
@cd dist; \
./rr -addr 0.0.0.0:8080
run:
@cd dist; \
./rr
copy-dist: clean-dist
mkdir -p ./dist
cp -r ./ui/dist ./dist/ui
cp ./core/rr ./dist/rr
nuke: clean
rm -f ./ui/src/config/reactiveRaven.ts
clean: clean-dist
rm -f ./core/rr
clean-dist:
rm -rf ./dist
rm -rf ./ui/dist
build: build-core build-ui
preview: dev-core preview-ui
dev: dev-core dev-ui
dev-core:
@cd ./core; \
$(MAKE) run
dev-ui:
@cd ./ui; \
yarn dev
preview-ui:
@cd ./ui; \
yarn preview
install: install-core install-ui copy-ui-example-config
install-core:
@echo "> installing dependencies for core"
@cd ./core; \
go mod download; \
go mod tidy
@echo "> done"
install-ui:
@echo "> installing dependencies for ui"
@cd ./ui; \
yarn install
@echo "> done"
copy-ui-example-config:
@echo "> copying example configuration for ui"
@cd ./ui; \
yarn copy-example-config
@echo "> done"
build-core:
@cd ./core; \
$(MAKE) build
build-core-linux:
@cd ./core; \
GOOS=linux GOARCH=amd64 $(MAKE) build
build-ui:
@cd ./ui; \
yarn build
test: test-core test-ui
test-core:
@cd ./core; \
$(MAKE) test
test-ui:
@cd ./ui; \
yarn lint && echo "> ui lint ok"; \
yarn test