]> 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:35:48 +0000 (10:35 -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 8071c05dd4f44d6af14589dc95391ef471e44894..b7c942fac28b9c466f62d34f2fed4d529552aedb 100644 (file)
@@ -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 );
 }