3 Commits

Author SHA1 Message Date
pk
faadc3eb6f bump version 2025-08-25 11:56:59 +02:00
pk
51be76d4ad Find a free port for livereload by default. 2025-08-25 11:56:41 +02:00
pk
2efa8b43a3 Make sure build errors let the build command exit with a error code. 2025-08-06 20:43:38 +02:00
2 changed files with 11 additions and 4 deletions

View File

@@ -35,7 +35,11 @@ func buildAction(ctx *cli.Context) error {
esBuildCfg.Plugins = append(esBuildCfg.Plugins, contentSwapPlugin(o))
api.Build(esBuildCfg)
result := api.Build(esBuildCfg)
if len(result.Errors) > 0 {
os.Exit(1)
}
replace(o)
if ctx.Bool("p") && o.ProductionBuildOptions.CmdPostBuild != "" {

View File

@@ -26,7 +26,7 @@ func main() {
app := &cli.App{
Name: "gowebbuild",
Usage: "All in one tool to build web frontend projects.",
Version: "7.3.0",
Version: "7.5.0",
Authors: []*cli.Author{{
Name: "trading-peter (https://github.com/trading-peter)",
}},
@@ -85,8 +85,11 @@ $ gowebbuild replace *.go foo bar
Flags: []cli.Flag{
cfgParam,
&cli.UintFlag{
Name: "lr-port",
Value: uint(lrserver.DefaultPort),
Name: "lr-port",
Value: (func() uint {
port := findFreePort(int(lrserver.DefaultPort), int(lrserver.DefaultPort)+100)
return uint(port)
}()),
Usage: "port for the live reload server",
},
},