-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
95 lines (77 loc) · 3.24 KB
/
Copy pathMakefile
File metadata and controls
95 lines (77 loc) · 3.24 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
SHELL := /bin/bash
GO_BIN := $(shell go env GOPATH)/bin
PROTO_FILE := api/proto/talos/hub/v1/hub.proto
.PHONY: help install-tools deps proto test build verify verify-core production-gate launchpad-test sdk-ts-test app-build dev talos-sync-css integration-hub
help:
@echo "Available targets:"
@echo " install-tools Install protoc Go plugins"
@echo " proto Regenerate protobuf + gRPC stubs"
@echo " deps npm install Launchpad + isolate npm for Go + go mod tidy"
@echo " test Run Go tests"
@echo " build Build Go packages"
@echo " verify Run validation checks; if they fail, try frontend-build then fail"
@echo " production-gate go test internal/buildmode (CI sanity for buildmode package)"
@echo " launchpad-test Run Launchpad (Vitest) unit tests"
@echo " sdk-ts-test Run Vitest for sdk/ts"
@echo " integration-hub Run hub gRPC integration tests"
@echo " frontend-build Build Launchpad (Vite) + sync sdk/talos CSS"
@echo " app-build Build Talos (wails build -tags=production); no Packages/* demos"
@echo " dev proto + frontend-build + wails dev (TALOS_DEV_MODE=1)"
@echo " talos-sync-css Copy Talos UI CSS from Launchpad to sdk/talos/"
@echo ""
@echo "Build modes:"
@echo " Release: make app-build produces one binary; use Launchpad Settings → Development mode (per package folder) for manifest dev commands."
@echo " Dev: make dev sets TALOS_DEV_MODE=1 for source-tree SDK/backend diagnostics (ignored in release builds)."
@echo " Other packages under Packages/ are built by their authors (see docs)."
install-tools:
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
deps:
npm --prefix Packages/Launchpad install
bash scripts/ensure-npm-go-modules.sh
go mod tidy
proto:
PATH="$(GO_BIN):$$PATH" protoc -I . \
--go_out=. --go_opt=paths=source_relative \
--go-grpc_out=. --go-grpc_opt=paths=source_relative \
$(PROTO_FILE)
test:
go test ./...
build:
go build ./...
verify-core: test build launchpad-test sdk-ts-test production-gate
verify:
@set -e; \
if $(MAKE) verify-core; then \
exit 0; \
fi; \
echo "verify failed; attempting frontend-build before exiting..."; \
$(MAKE) frontend-build || true; \
exit 1
sdk-ts-test:
npm --prefix sdk/ts install
npm --prefix sdk/ts test
# Ensures release-tagged buildmode always disables development surfaces.
production-gate:
go test -tags=production ./internal/buildmode -count=1
frontend-build: proto Packages/Launchpad
npm --prefix Packages/Launchpad install
bash scripts/ensure-npm-go-modules.sh
npm --prefix Packages/Launchpad run build
$(MAKE) talos-sync-css
go mod tidy
talos-sync-css:
@mkdir -p sdk/talos
cp -f Packages/Launchpad/src/talos/tokens.css Packages/Launchpad/src/talos/legacy-alias.css Packages/Launchpad/src/talos/utilities.css sdk/talos/
app-build: proto frontend-build verify
wails build -tags=production
launchpad-test:
npm --prefix Packages/Launchpad install
bash scripts/ensure-npm-go-modules.sh
npm --prefix Packages/Launchpad test -- --run
integration-hub:
go test ./internal/hub/ -tags=integration -count=1 -v
dev: proto frontend-build
rm -rf Temp/logs
mkdir -p Temp/logs/packages
TALOS_DEV_MODE=1 wails dev