From c2bcccc996bc7b8c4b1ed05e4613876770a279cc Mon Sep 17 00:00:00 2001 From: Cell <1024@lruihao.cn> Date: Fri, 30 Aug 2024 13:41:56 +0800 Subject: [PATCH] :rocket: Chore: after running `npm version` or manually modifying the version number, skip the update FixIt internal version --- build/update-version.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/update-version.js b/build/update-version.js index 9d7debd2..93ca66b1 100644 --- a/build/update-version.js +++ b/build/update-version.js @@ -46,8 +46,8 @@ const latestVersion = stage === 'version' ? version : devVersion; const lastVersion = initHtml.match(/v\d+\.\d+\.\d+(-\w+)?/)[0].slice(1); const newInitHtml = initHtml.replace(/v\d+\.\d+\.\d+(-\w+)?/, `v${latestVersion}`); -if (lastVersion === version) { - // After running `npm version`, the version number is updated +if (lastVersion === version && gitDiff.includes('layouts/partials/init/index.html')) { + // After running `npm version` or manually modifying the version number, skip the update console.log(`The FixIt version has been updated to v${lastVersion}.`); process.exit(0); }