script: Update check to exclude '-dev' versions

These should be rejected as not Rolling versions.
This commit is contained in:
DeeDeeG 2024-01-30 01:22:17 -05:00
parent 2dbd99582e
commit 5b58255a5b

View File

@ -9,8 +9,9 @@ const packageJson = require("../../package.json");
// Since cirrus always triggers this script, we must check if the version is a rolling
// release version
const verSegments = packageJson.version.split(".");
const lastVerSegment = verSegments[verSegments.length - 1];
if (verSegments[verSegments.length - 1].length < 4) {
if (lastVerSegment.length < 4 || lastVerSegment.includes('-dev')) {
console.log(`According to our version: ${packageJson.version} this is not a rolling release...`);
console.log("Exiting without changes...");
process.exit(0);