From 713e2568436e99c21243a39958838933d8dbf131 Mon Sep 17 00:00:00 2001 From: Adham Saad Date: Thu, 16 Mar 2017 13:34:53 +0200 Subject: [PATCH] :bug: #8919 - add new command that cleans only out & dist dirs --- package.json | 1 + script/clean-build.py | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100755 script/clean-build.py diff --git a/package.json b/package.json index a572a1918ef3..ef0a405fb422 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "bump-version": "./script/bump-version.py", "build": "python ./script/build.py -c D", "clean": "python ./script/clean.py", + "clean-build": "python ./script/clean-build.py", "coverage": "npm run instrument-code-coverage && npm test -- --use-instrumented-asar", "instrument-code-coverage": "electabul instrument --input-path ./lib --output-path ./out/coverage/electron.asar", "lint": "npm run lint-js && npm run lint-cpp && npm run lint-py && npm run lint-api-docs-js && npm run lint-api-docs", diff --git a/script/clean-build.py b/script/clean-build.py new file mode 100755 index 000000000000..7dad790daf07 --- /dev/null +++ b/script/clean-build.py @@ -0,0 +1,18 @@ +#!/usr/bin/env python + +import os +import sys + +from lib.util import rm_rf + + +SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) + + +def main(): + os.chdir(SOURCE_ROOT) + rm_rf('dist') + rm_rf('out') + +if __name__ == '__main__': + sys.exit(main())