platformio: add json validation step to fs builder
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
Torrie Fischer 2023-02-18 17:47:25 +01:00
parent 2cbfcecab9
commit ea876e243d
3 changed files with 24 additions and 9 deletions

View File

@ -12,6 +12,6 @@
"Idle": ["Solid", "MPU5060", "Pulse", "IdleColors", "CircadianRhythm"],
"Acid": ["Chimes", "Pulse", "MPU5060", "IdleColors", "Rainbow"],
"Flashlight": ["Flashlight"]
}
},
"surfaceMap": "default"
}

View File

@ -11,6 +11,7 @@
[common_env_data]
src_filter = "+<*> -<.git/> -<.svn/> -<platform/> -<inputs/>"
lib_ldf_mode = chain+
extra_scripts = verify-configs.py
src_build_flags =
-DRENDERBUG_VERSION=3
-DRENDERBUG_LED_PIN=14
@ -91,6 +92,7 @@ src_build_flags =
[env:esp32]
extends = config_nocolor
extra_scripts = verify-configs.py
platform = espressif32
board = featheresp32
framework = arduino
@ -170,15 +172,15 @@ lib_deps =
ESP8266WiFi
${config_ota.lib_deps}
[env:home_lighting_grb]
extends = env:home_lighting
src_build_flags =
${env:home_lighting.src_build_flags}
-DRENDERBUG_LED_PACKING=GRB
#[env:home_lighting_grb]
#extends = env:esp8266_wifi config_u8display
#src_build_flags =
# ${env:home_lighting.src_build_flags}
# -DRENDERBUG_LED_PACKING=GRB
[env:home_lighting-12f]
extends = env:home_lighting
board = esp12e
#[env:home_lighting-12f]
#extends = env:esp8266_wifi config_u8display
#board = esp12e
;[env:photon]
;platform = particlephoton

13
verify-configs.py Normal file
View File

@ -0,0 +1,13 @@
Import("env")
import fnmatch
import os
def verify_json(source, target, env):
for root, dirnames, files in os.walk("data"):
for file in files:
if file.endswith(".json"):
if (env.Execute("json_verify < " + root + '/' + file)):
Exit(1)
env.AddPreAction("buildfs", verify_json)