🚀 Chore: after running npm version or manually modifying the version number, skip the update FixIt internal version

This commit is contained in:
Cell
2024-08-30 13:41:56 +08:00
parent 4203b573cb
commit c2bcccc996
+2 -2
View File
@@ -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);
}