From b04b3861802606a114c936e753c0f20da6e8b236 Mon Sep 17 00:00:00 2001 From: Timmy Willison Date: Fri, 15 Nov 2013 10:23:23 -0500 Subject: [PATCH] Release script: Add .npmignore and keep .gitignore when creating the tag --- .npmignore | 11 +++++++++++ build/release.js | 23 +++-------------------- 2 files changed, 14 insertions(+), 20 deletions(-) create mode 100644 .npmignore 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 ); }