]> source.dussan.org Git - jquery.git/commitdiff
Fix bug with handling minor releases after major releases in the build script.
authorJohn Resig <jeresig@gmail.com>
Mon, 2 May 2011 20:25:20 +0000 (16:25 -0400)
committerJohn Resig <jeresig@gmail.com>
Mon, 2 May 2011 20:25:20 +0000 (16:25 -0400)
build/release.js

index 09f917b488c1c59e3972dc6f035a6e151b2a2076..7a42f998b499d7908adcfd7c28e691f32b80a588 100644 (file)
@@ -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;