handle buildweb condition when its part of a pio chain

This commit is contained in:
proddy
2025-10-24 15:33:50 +02:00
parent 16930fe8ca
commit 2f5b879652
2 changed files with 26 additions and 6 deletions

View File

@@ -110,7 +110,7 @@ def build_webUI(*args, **kwargs):
env.Exit(1)
env.Exit(0)
# Create custom target that only runs the script
# Create custom target that only runs the script and then exits, without continuing with the pio workflow
env.AddCustomTarget(
name="build",
dependencies=None,
@@ -118,3 +118,10 @@ env.AddCustomTarget(
title="build web interface",
description="installs pnpm packages, updates libraries and builds web UI"
)
# this is if its called with the target=build, so it will continue with the pio workflow
if not (env.IsCleanTarget()):
success = buildWeb()
if not success:
print("Web interface build failed!")