Release script: Add .npmignore and keep .gitignore when creating the tag

This commit is contained in:
Timmy Willison 2013-11-15 10:23:23 -05:00
parent 6f74abb7bf
commit b04b386180
2 changed files with 14 additions and 20 deletions

11
.npmignore Normal file
View File

@ -0,0 +1,11 @@
.editorconfig
.gitattributes
.jscs.json
.jshintignore
.jshintrc
.mailmap
.travis.yml
/build
/speed
/test
/Gruntfile.js

View File

@ -304,28 +304,11 @@ function commitDistFiles( next ) {
var pkgClone = readJSON( "package.json" );
delete pkgClone.scripts;
fs.writeFileSync( "package.json", JSON.stringify( pkgClone, null, "\t" ) );
fs.unlinkSync( ".gitignore" );
// Add files to be committed
git( [ "add", "package.json", devFile, minFile, mapFile, sizzleLoc ], function() {
// Remove unneeded files
git( [ "rm", "-r",
"build",
"speed",
"test",
".editorconfig",
".gitattributes",
".gitignore",
".jscs.json",
".jshintignore",
".jshintrc",
".mailmap",
".travis.yml",
"Gruntfile.js",
"README.md"
], function() {
// Use force to add normally ignored files
git( [ "add", "-f", "package.json", devFile, minFile, mapFile, sizzleLoc ], function() {
git( [ "commit", "-m", releaseVersion ], next, debug );
}, debug );
}, debug );
}
function tagRelease( next ) {