Build with Magefile #104341
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user