Fix bug with handling minor releases after major releases in the build script.

This commit is contained in:
John Resig 2011-05-02 16:25:20 -04:00
parent 53f275034a
commit c0d993903b

View File

@ -86,7 +86,7 @@ function setNextVersion( newVersion ) {
} else if ( /^\d+\.\d+\.?(\d*)$/.test( newVersion ) ) { } else if ( /^\d+\.\d+\.?(\d*)$/.test( newVersion ) ) {
newVersion = newVersion.replace( /^(\d+\.\d+\.?)(\d*)$/, function( all, pre, num ) { 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; isFinal = true;