Skip to content

Commit 998111d

Browse files
committed
Use git clean for cleaning up project files
Also tells you what it's removing
1 parent 8dea671 commit 998111d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/project.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
ROOT = abspath(join(dirname(__file__), ".."))
77
sys.path.insert(0, ROOT)
88

9+
from subprocess import Popen
910
from shutil import move, rmtree
1011
from argparse import ArgumentParser
1112
from os.path import normpath, realpath
@@ -199,8 +200,7 @@ def main():
199200

200201
# Clean Export Directory
201202
if options.clean:
202-
if exists(EXPORT_DIR):
203-
rmtree(EXPORT_DIR)
203+
Popen(["git", "clean", "-fe", "mbed-os"]).wait()
204204

205205
for mcu in options.mcu:
206206
zip_proj = not bool(options.source_dir)

0 commit comments

Comments
 (0)