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;