]> source.dussan.org Git - jquery.git/commitdiff
Release: remove extraneous files from dist during release
authorTimmy Willison <timmywillisn@gmail.com>
Mon, 9 May 2016 17:53:03 +0000 (13:53 -0400)
committerTimmy Willison <timmywillisn@gmail.com>
Fri, 13 May 2016 15:35:15 +0000 (11:35 -0400)
Fixes gh-3094
Close gh-3116

build/release.js
build/release/dist.js

index dd3745b35fde5a1d50579bd8e3fba8e7ee6de128..72d6ab5a35176143fa2c74e2b89448a95ed13077 100644 (file)
@@ -79,7 +79,7 @@ module.exports = function( Release ) {
 
 module.exports.dependencies = [
        "archiver@0.14.2",
-       "shelljs@0.2.6",
+       "shelljs@0.7.0",
        "npm@2.3.0",
        "chalk@1.1.1"
 ];
index 84ce35d3c33d109a5e306e928b07f209745089f1..da9ad2281477562c9146bb95ba4d91883e38166e 100644 (file)
@@ -56,7 +56,22 @@ module.exports = function( Release, files, complete ) {
 
                // Copy dist files
                var distFolder = Release.dir.dist + "/dist",
-                       externalFolder = Release.dir.dist + "/external";
+                       externalFolder = Release.dir.dist + "/external",
+                       rmIgnore = files
+                               .concat( [
+                                       "README.md",
+                                       "node_modules"
+                               ] )
+                               .map( function( file ) {
+                                       return Release.dir.dist + "/" + file;
+                               } );
+
+               shell.config.globOptions = {
+                       ignore: rmIgnore
+               };
+
+               // Remove extraneous files before copy
+               shell.rm( "-rf", Release.dir.dist + "/**/*" );
 
                shell.mkdir( "-p", distFolder );
                files.forEach( function( file ) {