Unverified 提交 7db7e366 authored 作者: Iñaki Baz Castillo's avatar Iñaki Baz Castillo 提交者: GitHub

Make invoke clean-all task delete worker/include/FBS (#1397)

- `worker/fbs/meson.build` produces FlatBuffers C++ include files in `worker/include/FBS` folder.
- Despite such a folder is gitignored, `cargo publish` complains if that folder and its files exist.
- So make `invoke clean-all` also delete `worker/include/FBS`.
- Bonus track: Use `shutil.rmtree(path, ignore_errors=True)` instead of wrapping it with `try/except` everywhere.
上级 c6aa049d
......@@ -170,10 +170,7 @@ def clean(ctx): # pylint: disable=unused-argument
"""
Clean the installation directory
"""
try:
shutil.rmtree(MEDIASOUP_INSTALL_DIR);
except:
pass;
shutil.rmtree(MEDIASOUP_INSTALL_DIR, ignore_errors=True);
@task
......@@ -181,10 +178,7 @@ def clean_build(ctx): # pylint: disable=unused-argument
"""
Clean the build directory
"""
try:
shutil.rmtree(BUILD_DIR);
except:
pass;
shutil.rmtree(BUILD_DIR, ignore_errors=True);
@task
......@@ -192,15 +186,8 @@ def clean_pip(ctx): # pylint: disable=unused-argument
"""
Clean the local pip setup
"""
try:
shutil.rmtree(PIP_MESON_NINJA_DIR);
except:
pass;
try:
shutil.rmtree(PIP_PYLINT_DIR);
except:
pass;
shutil.rmtree(PIP_MESON_NINJA_DIR, ignore_errors=True);
shutil.rmtree(PIP_PYLINT_DIR, ignore_errors=True);
@task(pre=[meson_ninja])
......@@ -233,10 +220,8 @@ def clean_all(ctx):
except:
pass;
try:
shutil.rmtree(MEDIASOUP_OUT_DIR);
except:
pass;
shutil.rmtree(MEDIASOUP_OUT_DIR, ignore_errors=True);
shutil.rmtree('include/FBS', ignore_errors=True);
@task(pre=[meson_ninja])
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论