Release: remove extraneous files from dist during release

Fixes gh-3094
Close gh-3116
This commit is contained in:
Timmy Willison 2016-05-09 13:53:03 -04:00
parent 5086b3012d
commit 95c7ab6897
2 changed files with 17 additions and 2 deletions

View 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"
];

View 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 ) {