Skip to content

Commit

Permalink
fix: skip build while find_apps if modified_components is an empt…
Browse files Browse the repository at this point in the history
…y list
  • Loading branch information
hfudev committed Oct 26, 2023
1 parent b086051 commit e66812f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions idf_build_apps/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,12 @@ def check_should_build(
self._checked_should_build = True
return

if modified_components == []: # noqa # it's different from `not modified_components`
self.build_status = BuildStatus.SKIPPED
self.build_comment = 'current build does not modify any components'
self._checked_should_build = True
return

# if no special rules defined, we left it unknown and decide with idf.py reconfigure
if not self.depends_components and not self.depends_filepatterns:
self._checked_should_build = True
Expand Down Expand Up @@ -689,6 +695,7 @@ def check_should_build(

# special rules defined, but not matched
self.build_status = BuildStatus.SKIPPED
self.build_comment = 'current build does not modify any components or files required by this app'
self._checked_should_build = True


Expand Down Expand Up @@ -813,11 +820,6 @@ def _build(
]

if modified_components is not None and check_app_dependencies and self.build_status == BuildStatus.UNKNOWN:
if not modified_components:
self.build_status = BuildStatus.SKIPPED
self.build_comment = 'current build does not modify any components'
return

subprocess_run(
common_args + ['reconfigure'],
log_terminal=False if self.build_log_path else True,
Expand Down

0 comments on commit e66812f

Please sign in to comment.