diff --git a/script/cibuild b/script/cibuild index e5a5366b7aa..8f5185da714 100755 --- a/script/cibuild +++ b/script/cibuild @@ -48,7 +48,7 @@ def main(): if PLATFORM == 'linux': os.environ['DISPLAY'] = ':99.0' - rm_rf(os.path.join(SOURCE_ROOT, 'out')) + execute(['clean.py']) # CI's npm is not reliable. npm = 'npm.cmd' if PLATFORM == 'win32' else 'npm' @@ -81,4 +81,7 @@ def run_script(script, args=[]): if __name__ == '__main__': - sys.exit(main()) + try: + sys.exit(main()) + except subprocess.CalledProcessError: + execute(['clean.py']) diff --git a/script/clean.py b/script/clean.py index f27ee9cbea3..cd72230a371 100755 --- a/script/clean.py +++ b/script/clean.py @@ -12,8 +12,10 @@ SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) def main(): os.chdir(SOURCE_ROOT) rm_rf('node_modules') + rm_rf('dist') rm_rf('out') rm_rf('spec/node_modules') + rm_rf('vendor/brightray/vendor/download/libchromiumcontent') if __name__ == '__main__':