Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
73 lines (60 loc) · 2.05 KB
/
Copy pathMakefile
File metadata and controls
73 lines (60 loc) · 2.05 KB
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
.DEFAULT_GOAL := help
PNPM ?= pnpm
DOCKER ?= docker
DOCKER_IMAGE ?= hami-webui
VERSION ?= dev
PLATFORM ?=
DOCKER_PLATFORM_FLAG := $(if $(strip $(PLATFORM)),--platform $(PLATFORM),)
.PHONY: help
help:
@printf '%s\n' \
'Local HAMi-WebUI development:' \
' make bootstrap Install locked Node.js dependencies' \
' make dev Start the Vite development server' \
' make lint Lint Web-entry tooling and Vue sources' \
' make test Run Vue unit and contract tests' \
' make build Build and pre-compress browser assets' \
' make verify-vite-env Check the Vite environment boundary' \
' make build-web-entry Build the standalone Web-entry contract binary' \
' make verify Run all frontend and Web-entry checks' \
' make build-image Build the application image' \
'' \
'Use PLATFORM=linux/amd64 (or linux/arm64) for an explicit image platform.'
.PHONY: bootstrap
bootstrap:
$(PNPM) install --frozen-lockfile --config.lockfile=true
.PHONY: dev
dev:
$(PNPM) --filter hami-webui-web run dev
.PHONY: lint
lint:
$(PNPM) run lint
$(PNPM) --filter hami-webui-web run lint
.PHONY: test
test:
$(PNPM) --filter hami-webui-web run test
.PHONY: build
build:
$(PNPM) --filter hami-webui-web run build
$(PNPM) run precompress:web-assets
.PHONY: verify-vite-env
verify-vite-env:
$(PNPM) run verify:vite-env
.PHONY: build-web-entry
build-web-entry:
$(MAKE) -C server build-web-entry
.PHONY: test-web-entry-contract
test-web-entry-contract:
$(PNPM) run test:web-entry-contract
.PHONY: test-web-entry-browser
test-web-entry-browser:
$(PNPM) run test:web-entry-browser
.PHONY: verify
verify: lint test verify-vite-env build build-web-entry
$(MAKE) test-web-entry-contract
$(MAKE) test-web-entry-browser
# This target creates one local development image. Stable multi-platform images
# are published only by .github/workflows/release.yaml.
.PHONY: build-image
build-image:
$(DOCKER) build $(DOCKER_PLATFORM_FLAG) -t $(DOCKER_IMAGE):$(VERSION) .