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