build: use WEB_GO for web targets and preserve backend dist directory (#1671)

Separate web Go commands from the default Go toolchain so web builds,
tests, and vet can enable CGO on Darwin without affecting the rest of
the project. Also ensure frontend backend builds recreate backend/dist
with a .gitkeep file so the embedded output directory remains tracked.
This commit is contained in:
wenjie authored and GitHub committed 2026-03-17 15:23:49 +08:00
1 parent b402888bfa
commit 0499cdab72
4 files changed
+27 -13

No files matched your search

@@ -0,0 +1,9 @@
const fs = require("node:fs")
const path = require("node:path")
const gitkeepPath = path.resolve(__dirname, "../../backend/dist/.gitkeep")
const gitkeepContents =
"# Keep the embedded web backend dist directory in version control.\n"
fs.mkdirSync(path.dirname(gitkeepPath), { recursive: true })
fs.writeFileSync(gitkeepPath, gitkeepContents)