diff options
author | Dave Methvin <dave.methvin@gmail.com> | 2015-01-06 22:03:07 -0500 |
---|---|---|
committer | Dave Methvin <dave.methvin@gmail.com> | 2015-01-06 22:03:35 -0500 |
commit | 16fcc5e9e2e6daa42661527dc69311230b5c5044 (patch) | |
tree | 0b460402093b1c7d43f5971cf1346a8549b25734 | |
parent | b635ee2d36f2ace7a75239de859da9fd777aa0cd (diff) | |
download | jquery-16fcc5e9e2e6daa42661527dc69311230b5c5044.tar.gz jquery-16fcc5e9e2e6daa42661527dc69311230b5c5044.zip |
Release: Remove copying of jquery-latest files
Closes gh-1942
-rw-r--r-- | build/release.js | 46 |
1 files changed, 18 insertions, 28 deletions
diff --git a/build/release.js b/build/release.js index 2aa785eca..56494a80e 100644 --- a/build/release.js +++ b/build/release.js @@ -14,13 +14,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 = [ @@ -45,27 +39,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 ); } }); } |