]> source.dussan.org Git - jquery.git/commitdiff
Release script: Add .npmignore and keep .gitignore when creating the tag
authorTimmy Willison <timmywillisn@gmail.com>
Fri, 15 Nov 2013 15:23:23 +0000 (10:23 -0500)
committerTimmy Willison <timmywillisn@gmail.com>
Fri, 15 Nov 2013 15:32:13 +0000 (10:32 -0500)
.npmignore [new file with mode: 0644]
build/release.js

diff --git a/.npmignore b/.npmignore
new file mode 100644 (file)
index 0000000..916b4c5
--- /dev/null
@@ -0,0 +1,11 @@
+.editorconfig
+.gitattributes
+.jscs.json
+.jshintignore
+.jshintrc
+.mailmap
+.travis.yml
+/build
+/speed
+/test
+/Gruntfile.js
index d4c4475d51a8b61011e349e8c926120f3d5835a8..e2008f855396fc0debb8f60a74916162f873ea17 100644 (file)
@@ -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 );
 }