Merge branch 'main' of https://git.btclock.dev/btclock/btclock_v3
Some checks failed
BTClock CI / merge (map[name:btclock_rev_b version:esp32s3], 213epd) (push) Has been cancelled
BTClock CI / merge (map[name:btclock_v8 version:esp32s3], 213epd) (push) Has been cancelled
BTClock CI / merge (map[name:lolin_s3_mini version:esp32s3], 213epd) (push) Has been cancelled
BTClock CI / merge (map[name:lolin_s3_mini version:esp32s3], 29epd) (push) Has been cancelled
BTClock CI / release (push) Has been cancelled
BTClock CI / build (push) Has been cancelled

This commit is contained in:
Djuri Baars 2024-12-18 21:40:53 +01:00
commit 1a4bc9b711

View file

@ -5,6 +5,9 @@ from shutil import copyfileobj, rmtree
from pathlib import Path from pathlib import Path
import subprocess import subprocess
revision = ( revision = (
subprocess.check_output(["git", "rev-parse", "HEAD"]) subprocess.check_output(["git", "rev-parse", "HEAD"])
.strip() .strip()
@ -43,5 +46,15 @@ def before_buildfs(source, target, env):
output_directory = 'data/build_gz' output_directory = 'data/build_gz'
process_directory(input_directory, output_directory) process_directory(input_directory, output_directory)
flash_size = env.BoardConfig().get("upload.flash_size", "4MB")
fs_image_name = f"littlefs_{flash_size}"
env.Replace(ESP32_FS_IMAGE_NAME=fs_image_name)
env.Replace(ESP8266_FS_IMAGE_NAME=fs_image_name)
os.environ["PUBLIC_BASE_URL"] = "" os.environ["PUBLIC_BASE_URL"] = ""
env.AddPreAction("$BUILD_DIR/littlefs.bin", before_buildfs) fs_name = env.get("ESP32_FS_IMAGE_NAME", "littlefs.bin")
# Or alternatively:
# fs_name = env.get("FSTOOLNAME", "littlefs.bin")
# Use the variable in the pre-action
env.AddPreAction(f"$BUILD_DIR/{fs_name}.bin", before_buildfs)