From f6001456e8f8b18bc021e29119cc595fa8d9a7af Mon Sep 17 00:00:00 2001 From: Shakar Bakr <5h4k4r.b4kr@gmail.com> Date: Tue, 19 Sep 2023 13:59:05 +0300 Subject: [PATCH] Code format Signed-off-by: Shakar Bakr <5h4k4r.b4kr@gmail.com> --- index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 61cbbbd..637155f 100644 --- a/index.js +++ b/index.js @@ -26,18 +26,18 @@ async function run() { const versionParts = version.split('.'); // 1.2.3 => [1, 2, 3] if (labelInput === 'major') { + versionParts[0] = parseInt(versionParts[0]) + 1; versionParts[1] = 0; versionParts[2] = 0; - } - else if (labelInput == 'minor') { + } else if (labelInput == 'minor') { + versionParts[1] = parseInt(versionParts[1]) + 1; versionParts[2] = 0; } else if (labelInput == 'patch') - // increment the patch version versionParts[2] = parseInt(versionParts[2]) + 1;