Merge pull request #903 from pulsar-edit/pulsar-rolling-script-version-check-tweak

script: Update version check in Rolling release binary upload script to exclude '-dev' versions
This commit is contained in:
DeeDeeG 2024-02-06 10:26:03 -05:00 committed by GitHub
commit ca8ee62ad0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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);