From 6b3a55ae60d4a1c9f42f636f2698768232e65092 Mon Sep 17 00:00:00 2001 From: Anthony Tseng Date: Wed, 15 Nov 2017 17:52:09 -0800 Subject: [PATCH 1/2] Clean legacy build/install generation before each packaging fix #11939 Auditors: @bsclifton Test Plan: (Test on all platforms) 1. CHANNEL=beta npm run build-package 2. CHANNEL=beta npm run build-installer 3. CHANNEL=nightly npm run build-package 4. Note the size of the resources/app.asar (should be ~266 megs, not > 1GB) --- tools/buildPackage.js | 22 ++++++++-------------- tools/lib/ignoredPaths.js | 4 +--- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/tools/buildPackage.js b/tools/buildPackage.js index 0baa8e16096..cc121c0e276 100644 --- a/tools/buildPackage.js +++ b/tools/buildPackage.js @@ -84,25 +84,19 @@ var cmds = ['echo cleaning up target...'] if (isWindows) { cmds = cmds.concat([ - `(if exist ${appName}-win32-x64 rmdir /s /q ${appName}-win32-x64)`, - `(if exist ${appName}-win32-ia32 rmdir /s /q ${appName}-win32-ia32)` + 'for /d %x in (*-win32-x64) do rmdir /s /q "%x"', + 'for /d %x in (*-win32-ia32) do rmdir /s /q "%x"' ]) - // Remove the destination folder for the selected arch - if (arch === 'ia32') { - cmds = cmds.concat([ - '(if exist dist-ia32 rmdir /s /q dist-ia32)' - ]) - } else { - cmds = cmds.concat([ - '(if exist dist-x64 rmdir /s /q dist-x64)' - ]) - } + // Remove the destination folder + cmds = cmds.concat([ + '(if exist dist rmdir /s /q dist)' + ]) } else { cmds = cmds.concat([ - 'rm -Rf ' + buildDir, + 'rm -Rf ' + '*-' + process.platform + '-' + arch, 'rm -Rf dist', - `rm -f ${appName}.tar.bz2` + `rm -f *.tar.bz2` ]) } diff --git a/tools/lib/ignoredPaths.js b/tools/lib/ignoredPaths.js index 3e919abcc0d..20b4a901ecf 100644 --- a/tools/lib/ignoredPaths.js +++ b/tools/lib/ignoredPaths.js @@ -55,7 +55,5 @@ module.exports = [ 'sqlite3', 'uglify-js', 'webdriverio', - 'webpack-dev-server', - 'Brave(.+)', - 'brave-(.+)' + 'webpack-dev-server' ] From a25788d94b00b2bdce3b050becacffcfcd859e58 Mon Sep 17 00:00:00 2001 From: Brian Clifton Date: Fri, 17 Nov 2017 15:09:45 -0800 Subject: [PATCH 2/2] Fixes after testing on Windows (using Git Bash) Auditor: @darkdh --- tools/buildPackage.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/buildPackage.js b/tools/buildPackage.js index cc121c0e276..4432a614dcb 100644 --- a/tools/buildPackage.js +++ b/tools/buildPackage.js @@ -84,8 +84,8 @@ var cmds = ['echo cleaning up target...'] if (isWindows) { cmds = cmds.concat([ - 'for /d %x in (*-win32-x64) do rmdir /s /q "%x"', - 'for /d %x in (*-win32-ia32) do rmdir /s /q "%x"' + 'cmd.exe /c for /d %x in (*-win32-x64) do rmdir /s /q "%x"', + 'cmd.exe /c for /d %x in (*-win32-ia32) do rmdir /s /q "%x"' ]) // Remove the destination folder