-
-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathmise.toml
More file actions
298 lines (254 loc) · 10.6 KB
/
Copy pathmise.toml
File metadata and controls
298 lines (254 loc) · 10.6 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
min_version = "2025.1.0"
[tools]
bun = "1.4.2"
go = "1.27.1"
node = "26.10.0"
# Tasks replace the old Makefile. Run them with `mise run <task>` (or `mise <task>`).
# List everything with `mise tasks`. Tools pinned in [tools] are on PATH inside
# every task, so commands call `go`/`bun`/`bunx` directly (no `mise exec --`).
# Naming: `verb:all` is the full aggregate, `verb:<target>` is a single component.
[tasks."build:all"]
description = "Build everything (web client, backend)"
run = [
{ task = "clean" },
{ task = "build:web-client" },
"go build -v -ldflags=\"-X 'github.com/timmo001/system-bridge/version.Version=$(git describe --tags --abbrev=0)'\" -o system-bridge-linux .",
]
run_windows = [
{ task = "clean" },
{ task = "build:web-client" },
"powershell -ExecutionPolicy Bypass -File ./.scripts/windows/generate-rc.ps1",
"windres system-bridge.rc -O coff -o system-bridge.syso",
"go build -v -ldflags=\"-H windowsgui -X 'github.com/timmo001/system-bridge/version.Version={{ exec(command='git describe --tags --abbrev=0') }}'\" -o system-bridge.exe .",
]
[tasks."build:console"]
description = "Build console version for debugging (Windows only)"
run = "echo 'Console build is only supported on Windows'"
run_windows = [
{ task = "clean" },
{ task = "build:web-client" },
"go build -v -ldflags=\"-X 'github.com/timmo001/system-bridge/version.Version={{ exec(command='git describe --tags --abbrev=0') }}'\" -o system-bridge-console.exe .",
]
[tasks."generate:schemas"]
description = "Generate Zod schemas from Go types"
run = [
"echo 'Generating Zod schemas from Go types...'",
"go run tools/generate-schemas/main.go",
"echo 'Formatting generated schemas...'",
"cd web-client && bun install && bun run format:write src/lib/system-bridge/types-modules-schemas.ts",
]
[tasks."build:web-client"]
description = "Build the web client"
depends = ["clean:web-client", "generate:schemas"]
run = '''
(cd web-client && bun run build)
echo "Waiting for file system to sync..."
sync
echo "Verifying build files are accessible..."
if ! ls web-client/dist/index.html >/dev/null 2>&1; then
echo "ERROR: web-client/dist/index.html not found"
exit 1
fi
if ! ls web-client/dist/assets/*.css >/dev/null 2>&1; then
echo "ERROR: CSS files not found in web-client/dist/assets/"
ls -la web-client/dist/assets/ || true
exit 1
fi
if ! ls web-client/dist/assets/*.js >/dev/null 2>&1; then
echo "ERROR: JS files not found in web-client/dist/assets/"
ls -la web-client/dist/assets/ || true
exit 1
fi
echo "Verifying Tailwind CSS compilation..."
CSS_FILE=$(find web-client/dist/assets -name "*.css" -type f 2>/dev/null | head -1)
if [ -z "$CSS_FILE" ]; then
echo "ERROR: No CSS file found for Tailwind verification"
exit 1
fi
TAILWIND_FOUND=0
if grep -qE "@layer utilities" "$CSS_FILE" 2>/dev/null; then
echo " ✓ Found @layer utilities"
TAILWIND_FOUND=1
fi
if grep -qE "\.(flex|grid|hidden|block)\{" "$CSS_FILE" 2>/dev/null; then
echo " ✓ Found Tailwind utility classes"
TAILWIND_FOUND=1
fi
if grep -qE "--tw-" "$CSS_FILE" 2>/dev/null; then
echo " ✓ Found Tailwind CSS custom properties"
TAILWIND_FOUND=1
fi
if [ "$TAILWIND_FOUND" -eq 0 ]; then
echo "ERROR: Tailwind CSS compilation failed - no utility classes found"
echo "Expected @layer utilities, utility classes (.flex, .grid, etc.), or --tw-* properties"
echo "This may indicate that @tailwindcss/vite plugin did not run properly"
exit 1
fi
echo "✓ Build files verified and ready for embedding"
'''
run_windows = "powershell -ExecutionPolicy Bypass -File ./.scripts/windows/build-web-client.ps1"
[tasks."package:all"]
description = "Build all Linux packages (DEB, RPM, Arch, Flatpak)"
depends = ["clean:dist", "build:all"]
run = '''
echo "Packaging all Linux formats in parallel..."
chmod +x ./.scripts/linux/create-deb.sh ./.scripts/linux/create-rpm.sh ./.scripts/linux/create-arch.sh ./.scripts/linux/create-flatpak.sh
VERSION="5.0.0-dev+$(git rev-parse --short HEAD)" ./.scripts/linux/create-deb.sh &
VERSION="5.0.0-dev+$(git rev-parse --short HEAD)" ./.scripts/linux/create-rpm.sh &
VERSION="5.0.0-dev+$(git rev-parse --short HEAD)" ./.scripts/linux/create-arch.sh &
VERSION="5.0.0-dev+$(git rev-parse --short HEAD)" ./.scripts/linux/create-flatpak.sh &
wait
'''
run_windows = "echo 'package:all is only supported on Linux hosts'"
[tasks."package:arch"]
description = "Create Arch Linux package"
depends = ["clean:dist"]
run = "VERSION=\"5.0.0-dev+$(git rev-parse --short HEAD)\" ./.scripts/linux/create-arch.sh"
[tasks."package:flatpak"]
description = "Create Flatpak package"
depends = ["clean:dist"]
run = "VERSION=\"5.0.0-dev+$(git rev-parse --short HEAD)\" ./.scripts/linux/create-flatpak.sh"
[tasks."package:deb"]
description = "Create Debian package"
depends = ["clean:dist"]
run = "VERSION=\"5.0.0-dev+$(git rev-parse --short HEAD)\" ./.scripts/linux/create-deb.sh"
[tasks."package:rpm"]
description = "Create RPM package"
depends = ["clean:dist"]
run = "VERSION=\"5.0.0-dev+$(git rev-parse --short HEAD)\" ./.scripts/linux/create-rpm.sh"
[tasks."package:windows-installer"]
description = "Create Windows installer"
depends = ["clean:dist", "download:now-playing"]
run = "echo 'Creating the Windows installer is only supported on Windows'"
run_windows = "powershell -ExecutionPolicy Bypass -File ./.scripts/windows/create-installer.ps1 /Clean"
[tasks."download:now-playing"]
description = "Download the Windows NowPlaying helper (Windows only)"
run = "echo 'Downloading the NowPlaying helper is only supported on Windows'"
run_windows = "powershell -ExecutionPolicy Bypass -File ./.scripts/windows/download-now-playing.ps1"
[tasks.install]
description = "Install the application with go install"
depends = ["build:all"]
run = "go install ."
[tasks.run]
description = "Build and run the application (development only)"
depends = ["build:all"]
dir = "web-client"
run = 'bunx concurrently -n "web,backend" -c "blue,green" "bun run dev" "../system-bridge-linux backend"'
run_windows = 'bunx concurrently -n "web,backend" -c "blue,green" "bun run dev" "../system-bridge.exe backend"'
[tasks."run:web-client"]
description = "Run the web client dev server (Vite)"
dir = "web-client"
run = "bun run dev"
[tasks."run:backend"]
description = "Build and run the backend server"
depends = ["build:all"]
run = "./system-bridge-linux backend"
run_windows = "./system-bridge.exe backend"
[tasks."run:backend-dev"]
description = "Build and run the backend server with console output"
depends = ["clean", "build:web-client"]
run = "go build -v -ldflags=\"-X 'github.com/timmo001/system-bridge/version.Version=$(git describe --tags --abbrev=0)'\" -o system-bridge-linux . && ./system-bridge-linux backend"
run_windows = "go build -v -ldflags=\"-X 'github.com/timmo001/system-bridge/version.Version={{ exec(command='git describe --tags --abbrev=0') }}'\" -o system-bridge.exe . && ./system-bridge.exe backend"
[tasks."serve:backend"]
description = "Start the backend dev server through pitchfork"
run = "pitchfork start backend"
[tasks."serve:web"]
description = "Start the web client dev server through pitchfork"
run = "pitchfork start web"
[tasks."serve:all"]
description = "Start all pitchfork dev servers"
run = "pitchfork start -l"
[tasks."serve:status"]
description = "Show pitchfork dev server status"
run = "pitchfork status"
[tasks."serve:logs"]
description = "Follow backend dev server logs"
run = "pitchfork logs -t backend"
[tasks."serve:restart"]
description = "Restart pitchfork dev servers"
run = "pitchfork restart backend web"
[tasks."serve:stop"]
description = "Stop pitchfork dev servers"
run = "pitchfork stop backend web"
[tasks.cli]
description = "Build and run the CLI (append subcommands after --, e.g. mise run cli -- version)"
depends = ["build:all"]
run = "./system-bridge-linux cli"
run_windows = "./system-bridge.exe cli"
[tasks."run:console"]
description = "Build and run console version for debugging (Windows only)"
depends = ["build:console"]
run = "echo 'Console run is only supported on Windows'"
run_windows = "./system-bridge-console.exe backend"
[tasks."processes:list"]
description = "List running System Bridge processes (Windows only)"
run = "echo 'Process management is only supported on Windows'"
run_windows = "powershell -ExecutionPolicy Bypass -File ./.scripts/windows/list-processes.ps1"
[tasks."processes:stop"]
description = "Stop all running System Bridge processes (Windows only)"
run = "echo 'Process management is only supported on Windows'"
run_windows = "powershell -ExecutionPolicy Bypass -File ./.scripts/windows/stop-processes.ps1"
[tasks.test]
description = "Run Go tests"
run = "go test -v ./..."
[tasks.check]
description = "Run all linters and tests"
depends = ["lint:all", "test"]
[tasks."lint:all"]
description = "Run all linters (Go, web client)"
depends = ["lint:go", "lint:web-client"]
[tasks."lint:go"]
description = "Run Go linters (fmt, vet)"
run = [
"go fmt ./...",
"go vet ./...",
]
[tasks."lint:web-client"]
description = "Run web client linters (Oxlint, typecheck)"
dir = "web-client"
run = [
"bun run lint",
"bun run typecheck",
]
[tasks.clean]
description = "Remove build artifacts"
run = "rm -f system-bridge system-bridge-linux"
run_windows = "powershell -ExecutionPolicy Bypass -File ./.scripts/windows/clean.ps1"
[tasks."clean:dist"]
description = "Remove dist directory"
run = "rm -rf .flatpak-builder AppDir appimagetool build dist dist-agg rpm-structure rpmbuild flatpak-build repo deb-structure"
run_windows = "powershell -ExecutionPolicy Bypass -File ./.scripts/windows/clean-dist.ps1"
[tasks."clean:web-client"]
description = "Remove web client build artifacts"
run = "rm -rf web-client/dist"
run_windows = "powershell -ExecutionPolicy Bypass -File ./.scripts/windows/clean-web-client.ps1"
[tasks.deps]
description = "Install all dependencies (go, web client, docs)"
run = '''
go mod tidy
(cd web-client && bun install)
(cd docs && bun install)
'''
[tasks.version]
description = "Show the version of the application"
depends = ["build:all"]
run = "./system-bridge-linux version"
run_windows = "./system-bridge.exe version"
[tasks."docs:dev"]
description = "Run the docs site dev server (Astro + Starlight)"
dir = "docs"
run = "bun run dev"
[tasks."docs:build"]
description = "Build the docs site (validates internal links)"
dir = "docs"
run = "bun install --frozen-lockfile && bun run build"
[tasks."docs:lint"]
description = "Lint docs markdown with the docs ruleset"
dir = "docs"
run = "bunx markdownlint-cli --config .markdownlint.json \"**/*.md\""
[tasks."omarchy-plugin:test-publisher"]
description = "Test the Omarchy plugin publisher"
run = "bash .github/scripts/bash/publish-omarchy-plugin.test.sh"
[tasks."omarchy-plugin:validate"]
description = "Validate the Omarchy plugin with the installed Omarchy"
run = "omarchy plugin validate omarchy-plugin"