From c095b50ec4392df0c76c4c0e60d93a662e2a9c37 Mon Sep 17 00:00:00 2001 From: a1mer Date: Fri, 7 Jun 2024 17:29:02 +0800 Subject: [PATCH] fix: release --- package.json | 2 +- release.mjs | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 77a2423..beeb8bf 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "aliyundrive-rename", "type": "module", - "version": "1.9.0", + "version": "0.9.0", "private": true, "packageManager": "pnpm@8.15.0", "description": "Batch rename files of aliyundrive.", diff --git a/release.mjs b/release.mjs index 5a246f4..24e613d 100644 --- a/release.mjs +++ b/release.mjs @@ -40,9 +40,11 @@ function bumpVersion(mode) { const index = groups.findIndex(x => x === mode) versionTuple[index]++ if (index === 1) - versionTuple[index + 1] = 0 - if (index === 0) - versionTuple[index + 2] = 0 + versionTuple[2] = 0 + if (index === 0) { + versionTuple[1] = 0 + versionTuple[2] = 0 + } pkg.version = versionTuple.join('.') fs.writeFileSync(resolve('./package.json'), `${JSON.stringify(pkg, null, 2)}\n`, 'utf-8')