Build with Magefile #104341

Merged
Sybren A. Stüvel merged 26 commits from magefile into main 2024-10-04 21:59:46 +02:00
Showing only changes of commit 350c4f3686 - Show all commits

View File

@ -10,6 +10,7 @@ import (
"github.com/magefile/mage/mg"
"github.com/magefile/mage/sh"
"github.com/magefile/mage/target"
)
const (
@ -52,6 +53,13 @@ func FlamencoWorker() error {
// Build the webapp as static files that can be served
func WebappStatic() error {
runInstall, err := target.Dir("web/app/node_modules")
if err != nil {
return err
}
if runInstall {
mg.SerialDeps(WebappInstallDeps)
}
if err := cleanWebappStatic(); err != nil {
return err
}
@ -63,7 +71,7 @@ func WebappStatic() error {
// When changing the base URL, also update the line
// e.GET("/app/*", echo.WrapHandler(webAppHandler))
// in `cmd/flamenco-manager/main.go`
err := sh.RunWithV(env,
err = sh.RunWithV(env,
"yarn",
"--cwd", "web/app",
"build",