mirror of
https://github.com/wled/WLED.git
synced 2025-07-24 11:16:37 +00:00
Integrate usermods environment
Move the "all usermods" logic in to the platformio script, so the 'usermods' environment can be built in any checkout without extra setup commands.
This commit is contained in:
parent
270d75afe2
commit
8fd905215f
5
.github/workflows/build.yml
vendored
5
.github/workflows/build.yml
vendored
@ -57,11 +57,6 @@ jobs:
|
||||
cache: 'pip'
|
||||
- name: Install PlatformIO
|
||||
run: pip install -r requirements.txt
|
||||
- name: Add usermods environment
|
||||
run: |
|
||||
cp -v usermods/platformio_override.usermods.ini platformio_override.ini
|
||||
echo -n "custom_usermods = " >> platformio_override.ini
|
||||
find usermods/ -name library.json | xargs dirname | xargs -n 1 basename | xargs echo >> platformio_override.ini
|
||||
|
||||
- name: Build firmware
|
||||
run: pio run -e ${{ matrix.environment }}
|
||||
|
@ -2,6 +2,11 @@ Import('env')
|
||||
from pathlib import Path # For OS-agnostic path manipulation
|
||||
|
||||
usermod_dir = Path(env["PROJECT_DIR"]) / "usermods"
|
||||
all_usermods = [f for f in usermod_dir.iterdir() if f.is_dir() and f.joinpath('library.json').exists()]
|
||||
|
||||
if env['PIOENV'] == "usermods":
|
||||
# Add all usermods
|
||||
env.GetProjectConfig().set(f"env:usermods", 'custom_usermods', " ".join([f.name for f in all_usermods]))
|
||||
|
||||
def find_usermod(mod: str):
|
||||
"""Locate this library in the usermods folder.
|
||||
|
@ -632,3 +632,4 @@ build_unflags = ${common.build_unflags}
|
||||
build_flags = ${common.build_flags} ${esp32.build_flags} -D WLED_RELEASE_NAME=\"USERMODS\"
|
||||
${esp32.AR_build_flags}
|
||||
lib_deps = ${esp32.lib_deps}
|
||||
board_build.partitions = ${esp32.big_partitions}
|
||||
|
@ -1,9 +0,0 @@
|
||||
[env:usermods]
|
||||
board = esp32dev
|
||||
platform = ${esp32.platform}
|
||||
platform_packages = ${esp32.platform_packages}
|
||||
build_unflags = ${common.build_unflags}
|
||||
build_flags = ${common.build_flags} ${esp32.build_flags} -D WLED_RELEASE_NAME=\"USERMODS\"
|
||||
${esp32.AR_build_flags}
|
||||
lib_deps = ${esp32.lib_deps}
|
||||
board_build.partitions = ${esp32.big_partitions}
|
Loading…
x
Reference in New Issue
Block a user