mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
replace auto-gen of XLS doc files and Modbus with python
This commit is contained in:
14
scripts/force_clean.py
Normal file
14
scripts/force_clean.py
Normal file
@@ -0,0 +1,14 @@
|
||||
|
||||
Import("env")
|
||||
import os
|
||||
import shutil
|
||||
|
||||
def force_clean(source, target, env):
|
||||
"""Remove build directory before building"""
|
||||
build_dir = env.subst("$BUILD_DIR")
|
||||
if os.path.exists(build_dir):
|
||||
print(f"Force cleaning: {build_dir}")
|
||||
shutil.rmtree(build_dir)
|
||||
|
||||
# Register the callback to run before building
|
||||
env.AddPreAction("$BUILD_DIR/${PROGNAME}$PROGSUFFIX", force_clean)
|
||||
Reference in New Issue
Block a user