aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorDave Methvin <dave.methvin@gmail.com>2015-01-06 21:59:14 -0500
committerDave Methvin <dave.methvin@gmail.com>2015-01-06 21:59:14 -0500
commitc34ed46eee12c92cb050a53eb62daf9e1258caf9 (patch)
treeeb2fad5c3a492cb3780565278f238b0904b4e9e0 /build
parent83b038fc81ec12e29dba92ad022e1d5fcf4980bc (diff)
downloadjquery-c34ed46eee12c92cb050a53eb62daf9e1258caf9.tar.gz
jquery-c34ed46eee12c92cb050a53eb62daf9e1258caf9.zip
Release: Remove copying of jquery-latest files
Diffstat (limited to 'build')
-rw-r--r--build/release.js47
1 files changed, 18 insertions, 29 deletions
diff --git a/build/release.js b/build/release.js
index e6b429eed..43be272ad 100644
--- a/build/release.js
+++ b/build/release.js
@@ -14,14 +14,7 @@ module.exports = function( Release ) {
releaseFiles = {
"jquery-VER.js": devFile,
"jquery-VER.min.js": minFile,
- "jquery-VER.min.map": mapFile //,
-// Disable these until 2.0 defeats 1.9 as the ONE TRUE JQUERY
- // "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 = [
@@ -46,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 );
}
});
}