forked from platformio/platformio-core
Fix an issue when platformio ci
recompiles project if `--keep-build-dir
` option is passed // Resolve #2109
This commit is contained in:
@ -10,6 +10,8 @@ PlatformIO 4.0
|
|||||||
* Added Python 3.5+ support
|
* Added Python 3.5+ support
|
||||||
(`issue #895 <https://github.com/platformio/platformio-core/issues/895>`_)
|
(`issue #895 <https://github.com/platformio/platformio-core/issues/895>`_)
|
||||||
* Fixed an issue with slow updating of PlatformIO Core packages on Windows
|
* Fixed an issue with slow updating of PlatformIO Core packages on Windows
|
||||||
|
* Fixed an issue when `platformio ci <https://docs.platformio.org/en/latest/userguide/cmd_ci.html>`__ recompiles project if ``--keep-build-dir`` option is passed
|
||||||
|
(`issue #2109 <https://github.com/platformio/platformio-core/issues/2109>`_)
|
||||||
|
|
||||||
PlatformIO 3.0
|
PlatformIO 3.0
|
||||||
--------------
|
--------------
|
||||||
|
@ -84,7 +84,11 @@ def cli( # pylint: disable=too-many-arguments
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
app.set_session_var("force_option", True)
|
app.set_session_var("force_option", True)
|
||||||
_clean_dir(build_dir)
|
|
||||||
|
if not keep_build_dir and isdir(build_dir):
|
||||||
|
util.rmtree_(build_dir)
|
||||||
|
if not isdir(build_dir):
|
||||||
|
makedirs(build_dir)
|
||||||
|
|
||||||
for dir_name, patterns in dict(lib=lib, src=src).items():
|
for dir_name, patterns in dict(lib=lib, src=src).items():
|
||||||
if not patterns:
|
if not patterns:
|
||||||
@ -116,11 +120,6 @@ def cli( # pylint: disable=too-many-arguments
|
|||||||
util.rmtree_(build_dir)
|
util.rmtree_(build_dir)
|
||||||
|
|
||||||
|
|
||||||
def _clean_dir(dirpath):
|
|
||||||
util.rmtree_(dirpath)
|
|
||||||
makedirs(dirpath)
|
|
||||||
|
|
||||||
|
|
||||||
def _copy_contents(dst_dir, contents):
|
def _copy_contents(dst_dir, contents):
|
||||||
items = {"dirs": set(), "files": set()}
|
items = {"dirs": set(), "files": set()}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user