]> source.dussan.org Git - jquery.git/commitdiff
Release: Remove copying of jquery-latest files
authorDave Methvin <dave.methvin@gmail.com>
Wed, 7 Jan 2015 03:03:07 +0000 (22:03 -0500)
committerDave Methvin <dave.methvin@gmail.com>
Wed, 7 Jan 2015 03:06:30 +0000 (22:06 -0500)
Closes gh-1942
(cherry picked from commit 16fcc5e9e2e6daa42661527dc69311230b5c5044)

build/release.js

index 1818d4d9e098bf60f84f4ace90d279c56166a410..75d482bdd5393a2878783e7c9c216c2e573cb66a 100644 (file)
@@ -13,13 +13,7 @@ module.exports = function( Release ) {
                releaseFiles = {
                        "jquery-VER.js": devFile,
                        "jquery-VER.min.js": minFile,
-                       "jquery-VER.min.map": mapFile,
-                       "jquery.js": devFile,
-                       "jquery.min.js": minFile,
-                       "jquery.min.map": mapFile,
-                       "jquery-latest.js": devFile,
-                       "jquery-latest.min.js": minFile,
-                       "jquery-latest.min.map": mapFile
+                       "jquery-VER.min.map": mapFile
                },
 
                googleFilesCDN = [
@@ -44,27 +38,23 @@ module.exports = function( Release ) {
                                unpathedFile = key.replace( /VER/g, Release.newVersion ),
                                releaseFile = cdnFolder + "/" + unpathedFile;
 
-                       // Beta releases don't update the jquery-latest etc. copies
-                       if ( !Release.preRelease || key.indexOf( "VER" ) >= 0 ) {
-
-                               if ( /\.map$/.test( releaseFile ) ) {
-                                       // Map files need to reference the new uncompressed name;
-                                       // assume that all files reside in the same directory.
-                                       // "file":"jquery.min.js","sources":["jquery.js"]
-                                       text = fs.readFileSync( builtFile, "utf8" )
-                                               .replace( /"file":"([^"]+)","sources":\["([^"]+)"\]/,
-                                                       "\"file\":\"" + unpathedFile.replace( /\.min\.map/, ".min.js" ) +
-                                                       "\",\"sources\":[\"" + unpathedFile.replace( /\.min\.map/, ".js" ) + "\"]" );
-                                       fs.writeFileSync( releaseFile, text );
-                               } else if ( /\.min\.js$/.test( releaseFile ) ) {
-                                       // Remove the source map comment; it causes way too many problems.
-                                       // Keep the map file in case DevTools allow manual association.
-                                       text = fs.readFileSync( builtFile, "utf8" )
-                                               .replace( /\/\/# sourceMappingURL=\S+/, "" );
-                                       fs.writeFileSync( releaseFile, text );
-                               } else if ( builtFile !== releaseFile ) {
-                                       shell.cp( "-f", builtFile, releaseFile );
-                               }
+                       if ( /\.map$/.test( releaseFile ) ) {
+                               // Map files need to reference the new uncompressed name;
+                               // assume that all files reside in the same directory.
+                               // "file":"jquery.min.js","sources":["jquery.js"]
+                               text = fs.readFileSync( builtFile, "utf8" )
+                                       .replace( /"file":"([^"]+)","sources":\["([^"]+)"\]/,
+                                               "\"file\":\"" + unpathedFile.replace( /\.min\.map/, ".min.js" ) +
+                                               "\",\"sources\":[\"" + unpathedFile.replace( /\.min\.map/, ".js" ) + "\"]" );
+                               fs.writeFileSync( releaseFile, text );
+                       } else if ( /\.min\.js$/.test( releaseFile ) ) {
+                               // Remove the source map comment; it causes way too many problems.
+                               // Keep the map file in case DevTools allow manual association.
+                               text = fs.readFileSync( builtFile, "utf8" )
+                                       .replace( /\/\/# sourceMappingURL=\S+/, "" );
+                               fs.writeFileSync( releaseFile, text );
+                       } else if ( builtFile !== releaseFile ) {
+                               shell.cp( "-f", builtFile, releaseFile );
                        }
                });
        }