fix: move embed to repo root; make build sequential
- Move embed_prod.go/embed_dev.go out of cmd/wotra/ into root-level assets_prod.go / assets_dev.go (package assets). go:embed paths must be relative to the source file; cmd/wotra/ cannot reach ../../web/build. - Update cmd/wotra/main.go to import the root assets package. - Change mise.toml build task from parallel depends to sequential shell commands (build:web then build:go) so the frontend is always compiled before the Go embed runs.
This commit is contained in:
@@ -10,8 +10,11 @@ DB_PATH = "wotra.db"
|
||||
TZ = "UTC"
|
||||
|
||||
[tasks.build]
|
||||
description = "Build production single binary (web + Go)"
|
||||
depends = ["build:web", "build:go"]
|
||||
description = "Build production single binary (web + Go, sequential)"
|
||||
run = """
|
||||
mise run build:web
|
||||
mise run build:go
|
||||
"""
|
||||
|
||||
[tasks."build:web"]
|
||||
description = "Build Svelte frontend"
|
||||
|
||||
Reference in New Issue
Block a user