mirror of
https://github.com/esphome/esphome.git
synced 2025-09-05 12:52:19 +01:00
[esp32] Rebuild when idf_component.yml changes (#10540)
This commit is contained in:
@@ -40,6 +40,7 @@ from esphome.cpp_generator import RawExpression
|
|||||||
import esphome.final_validate as fv
|
import esphome.final_validate as fv
|
||||||
from esphome.helpers import copy_file_if_changed, mkdir_p, write_file_if_changed
|
from esphome.helpers import copy_file_if_changed, mkdir_p, write_file_if_changed
|
||||||
from esphome.types import ConfigType
|
from esphome.types import ConfigType
|
||||||
|
from esphome.writer import clean_cmake_cache
|
||||||
|
|
||||||
from .boards import BOARDS, STANDARD_BOARDS
|
from .boards import BOARDS, STANDARD_BOARDS
|
||||||
from .const import ( # noqa
|
from .const import ( # noqa
|
||||||
@@ -1074,7 +1075,11 @@ def _write_idf_component_yml():
|
|||||||
contents = yaml_util.dump({"dependencies": dependencies})
|
contents = yaml_util.dump({"dependencies": dependencies})
|
||||||
else:
|
else:
|
||||||
contents = ""
|
contents = ""
|
||||||
write_file_if_changed(yml_path, contents)
|
if write_file_if_changed(yml_path, contents):
|
||||||
|
dependencies_lock = CORE.relative_build_path("dependencies.lock")
|
||||||
|
if os.path.isfile(dependencies_lock):
|
||||||
|
os.remove(dependencies_lock)
|
||||||
|
clean_cmake_cache()
|
||||||
|
|
||||||
|
|
||||||
# Called by writer.py
|
# Called by writer.py
|
||||||
|
@@ -310,6 +310,10 @@ def clean_build():
|
|||||||
if os.path.isdir(piolibdeps):
|
if os.path.isdir(piolibdeps):
|
||||||
_LOGGER.info("Deleting %s", piolibdeps)
|
_LOGGER.info("Deleting %s", piolibdeps)
|
||||||
shutil.rmtree(piolibdeps)
|
shutil.rmtree(piolibdeps)
|
||||||
|
dependencies_lock = CORE.relative_build_path("dependencies.lock")
|
||||||
|
if os.path.isfile(dependencies_lock):
|
||||||
|
_LOGGER.info("Deleting %s", dependencies_lock)
|
||||||
|
os.remove(dependencies_lock)
|
||||||
|
|
||||||
|
|
||||||
GITIGNORE_CONTENT = """# Gitignore settings for ESPHome
|
GITIGNORE_CONTENT = """# Gitignore settings for ESPHome
|
||||||
|
Reference in New Issue
Block a user