From f20fd158b62d571008d4a8ad85d46e0b28f40f29 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Wed, 1 Jun 2022 14:43:23 +0200 Subject: [PATCH] Prep tasmota source subdirs --- pio-tools/pre_source_dir.py | 12 ++++++++++++ platformio.ini | 3 ++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 pio-tools/pre_source_dir.py diff --git a/pio-tools/pre_source_dir.py b/pio-tools/pre_source_dir.py new file mode 100644 index 000000000..19198f394 --- /dev/null +++ b/pio-tools/pre_source_dir.py @@ -0,0 +1,12 @@ +import glob +import os + +Import("env") + +def FindInoNodes(env): + src_dir = glob.escape(env.subst("$PROJECT_SRC_DIR")) + return env.Glob(os.path.join(src_dir, "*.ino")) + env.Glob( + os.path.join(src_dir, "ino_*", "*.ino") + ) + +env.AddMethod(FindInoNodes) diff --git a/platformio.ini b/platformio.ini index 6b77f47c1..773eb4401 100644 --- a/platformio.ini +++ b/platformio.ini @@ -64,7 +64,8 @@ lib_extra_dirs = ;bin_dir = /tmp/bin_files/ [scripts_defaults] -extra_scripts = pio-tools/strip-floats.py +extra_scripts = pre:pio-tools/pre_source_dir.py + pio-tools/strip-floats.py pio-tools/name-firmware.py pio-tools/gzip-firmware.py pio-tools/override_copy.py