From: Timmy Willison Date: Fri, 15 Nov 2013 15:23:23 +0000 (-0500) Subject: Release script: Add .npmignore and keep .gitignore when creating the tag X-Git-Tag: 2.1.0-beta3~26 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b04b3861802606a114c936e753c0f20da6e8b236;p=jquery.git Release script: Add .npmignore and keep .gitignore when creating the tag --- diff --git a/.npmignore b/.npmignore new file mode 100644 index 000000000..916b4c532 --- /dev/null +++ b/.npmignore @@ -0,0 +1,11 @@ +.editorconfig +.gitattributes +.jscs.json +.jshintignore +.jshintrc +.mailmap +.travis.yml +/build +/speed +/test +/Gruntfile.js diff --git a/build/release.js b/build/release.js index d4c4475d5..e2008f855 100644 --- a/build/release.js +++ b/build/release.js @@ -304,27 +304,10 @@ 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() { - git( [ "commit", "-m", releaseVersion ], next, debug ); - }, debug ); + // Use force to add normally ignored files + git( [ "add", "-f", "package.json", devFile, minFile, mapFile, sizzleLoc ], function() { + git( [ "commit", "-m", releaseVersion ], next, debug ); }, debug ); }