Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
66 lines (52 loc) · 2.11 KB
/
Copy pathMakefile
File metadata and controls
66 lines (52 loc) · 2.11 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
.PHONY: help check build test cli-build web-test desktop-deps desktop-test desktop-build \
rust-test js-test demo-check sync-check import-status
help:
@printf '%s\n' \
'check Build and test locally (./scripts/check.sh)' \
'build Build the CLI and the desktop web bundle' \
'test Run in-tree tests and satellite tests when those trees exist' \
'cli-build go build -o dist/devpod .' \
'web-test go test ./cmd/web/...' \
'desktop-test Yarn install and Vitest in desktop/' \
'desktop-build Yarn install and yarn build:web' \
'rust-test cargo test --workspace when Rust satellites are imported' \
'js-test npm test for devpod-pro-ui and devpod-e2e-tests when imported' \
'demo-check Parse examples/devpod-demo devcontainer.json' \
'sync-check Check Cargo members and npm workspaces against the manifest' \
'import-status Print monorepo.manifest.json import status'
check:
./scripts/check.sh
build: cli-build desktop-build
test: web-test desktop-test rust-test js-test demo-check
cli-build:
mkdir -p dist
go build -o dist/devpod .
web-test:
go test ./cmd/web/...
desktop-deps:
yarn --cwd desktop install --frozen-lockfile
desktop-test: desktop-deps
yarn --cwd desktop test
desktop-build: desktop-deps
yarn --cwd desktop build:web
sync-check:
python3 hack/sync-workspaces.py --check
rust-test: sync-check
@members=$$(python3 hack/sync-workspaces.py --list rust); \
if [ -z "$$members" ]; then \
echo "rust: devpod-api, devpod-enterprise, and devpod-ssh-gateway are not imported; skipping cargo test"; \
else \
cargo test --workspace --locked; \
fi
js-test: sync-check
@members=$$(python3 hack/sync-workspaces.py --list js); \
if [ -z "$$members" ]; then \
echo "js: devpod-pro-ui and devpod-e2e-tests are not imported; skipping npm test"; \
else \
npm install; \
npm test --workspaces --if-present; \
fi
demo-check:
python3 -c 'import json; p="examples/devpod-demo/.devcontainer/devcontainer.json"; json.load(open(p)); print("demo devcontainer json ok", p)'
import-status:
./hack/import-satellites.sh --status