mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
handle buildweb condition when its part of a pio chain
This commit is contained in:
@@ -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!")
|
||||
|
||||
Reference in New Issue
Block a user