-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile
51 lines (38 loc) · 920 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
VERSION?=latest
DOCKER_IMAGE=projecthami/hami-webui-fe
OUT=./dist
PROJECT_NAME?=test-project
# 按项目最小化构建
ROUTE_FILE=packages/web/src/router/index.js
PROJECT_PATH=packages/web/projects/
DISABLED_PROJECTS?=""
.PHONY: install-modules
install-modules:
pnpm install
.PHONY: build-all
build-all: install-modules build-bff build-web
.PHONY: build-bff
build-bff:
pnpm run build
.PHONY: build-web
build-web:
cd packages/web && pnpm run build
.PHONY: start-dev
start-dev: install-modules start-bff start-web
.PHONY: start-bff
start-bff:
pnpm run start:dev &
.PHONY: start-web
start-web:
cd packages/web && pnpm run start:dev
.PHONY: start-prod
start-prod:
pnpm run start:prod
.PHONY: build-image
build-image:
docker build --platform linux/amd64 -t ${DOCKER_IMAGE}:${VERSION} .
.PHONY: push-image
push-image:
docker push ${DOCKER_IMAGE}:${VERSION}
.PHONY: release
release: build-image push-image