From 9b860e922714a5c918a74e9a2df1cac30704fb19 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 0000000000..916b4c5324 --- /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 8071c05dd4..b7c942fac2 100644 --- a/build/release.js +++ b/build/release.js @@ -303,27 +303,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 ); }