Compare commits

..

2 Commits

View File

@@ -21,7 +21,7 @@ const { values } = parseArgs({
} }
}); });
if (!["major", "minor", "patch"].includes(values.bump)) { if (values.bump !== undefined && !["major", "minor", "patch"].includes(values.bump)) {
console.error(`Invalid bump type: ${values.bump}. Allowed values are: major, minor, patch.`); console.error(`Invalid bump type: ${values.bump}. Allowed values are: major, minor, patch.`);
process.exit(1); process.exit(1);
} }
@@ -46,7 +46,7 @@ console.log(`SK Azure Tools Locked version: ${skAzToolsPackageLock.version}`);
// Update package.json if --update flag is set // Update package.json if --update flag is set
// or if the version of @slawek/sk-az-tools in package.json // or if the version of @slawek/sk-az-tools in package.json
// is different than the version in package-lock.json. // is different than the version in package-lock.json.
if (values.update || skAzToolsPackage.version !== skToolsPackage.version) { if (values.update || skAzToolsPackage.version !== skAzToolsPackageLock.version) {
console.log(`Updating package.json...`); console.log(`Updating package.json...`);
skAzToolsPackage.dependencies["@slawek/sk-tools"] = `>=${skToolsPackage.version}`; skAzToolsPackage.dependencies["@slawek/sk-tools"] = `>=${skToolsPackage.version}`;
writeFileSync(skAzToolsPackagePath, JSON.stringify(skAzToolsPackage, null, 4)); writeFileSync(skAzToolsPackagePath, JSON.stringify(skAzToolsPackage, null, 4));