From 8125e0fefa2a9366f0718d5bb6c928e81017d602 Mon Sep 17 00:00:00 2001 From: fridaystreet Date: Fri, 22 Apr 2016 08:52:33 +0800 Subject: [PATCH] exclude build directory from zip currently running package with no build directory argument creates build directory and zips in the application directory. When running subsequent builds the zip files include the previous build files which causes them to grow infinitely with each package run. added -x \*build\* to command line for zip to exclude from packaging --- lib/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/main.js b/lib/main.js index 76fdfc03..dade0ac8 100644 --- a/lib/main.js +++ b/lib/main.js @@ -223,7 +223,7 @@ Lambda.prototype._zip = function (program, codeDirectory, callback) { Lambda.prototype._nativeZip = function (program, codeDirectory, callback) { var zipfile = this._zipfileTmpPath(program), - cmd = 'zip -r ' + zipfile + ' .'; + cmd = 'zip -x \\*build\\* -r ' + zipfile + ' .'; exec(cmd, { cwd: codeDirectory,