-
Notifications
You must be signed in to change notification settings - Fork 12
/
Makefile
59 lines (43 loc) · 878 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
47
48
49
50
51
52
53
54
55
56
57
58
59
# Makefile for Go project
default: build
# All target
all: ui
$(MAKE) build
ui: ui-admin ui-user
ui-admin:
cd ui/admin && \
pnpm install
ui-user:
cd ui/user && \
pnpm install && \
pnpm run build
clean:
rm -rf ui/admin/build
rm -rf ui/user/build
serve-docs:
cd docs && \
npm install && \
npm run start
# Build the project
build:
go build -ldflags="-s -w" -o bin/otto8 .
dev:
./tools/dev.sh $(ARGS)
dev-open: ARGS=--open-uis
dev-open: dev
# Lint the project
lint: lint-admin
lint-admin:
cd ui/admin && \
pnpm run format && \
pnpm run lint
package-tools:
./tools/package-tools.sh
no-changes:
@if [ -n "$$(git status --porcelain)" ]; then \
git status --porcelain; \
git --no-pager diff; \
echo "Encountered dirty repo!"; \
exit 1; \
fi
.PHONY: ui ui-admin ui-user build all clean dev dev-open lint lint-admin lint-api no-changes fmt tidy