From: John Resig Date: Mon, 2 May 2011 20:25:20 +0000 (-0400) Subject: Fix bug with handling minor releases after major releases in the build script. X-Git-Tag: 1.6.1rc1~43 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c0d993903b789ec0cba040409a19d01bd65ad7e7;p=jquery.git Fix bug with handling minor releases after major releases in the build script. --- diff --git a/build/release.js b/build/release.js index 09f917b48..7a42f998b 100644 --- a/build/release.js +++ b/build/release.js @@ -86,7 +86,7 @@ function setNextVersion( newVersion ) { } else if ( /^\d+\.\d+\.?(\d*)$/.test( newVersion ) ) { newVersion = newVersion.replace( /^(\d+\.\d+\.?)(\d*)$/, function( all, pre, num ) { - return pre + (num ? parseFloat( num ) + 1 : 1) + "pre"; + return pre + (pre.charAt( pre.length - 1 ) !== "." ? "." : "") + (num ? parseFloat( num ) + 1 : 1) + "pre"; }); isFinal = true;