From: Tim Otten Date: Thu, 2 Nov 2023 00:53:06 +0000 (-0700) Subject: set-version - Yes increment for 5.68.x=>5.69.alpha. But OK to skip alpha2, beta2... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=6c74c315d28b923dab01b061423b6b90bd74eff8;p=civicrm-core.git set-version - Yes increment for 5.68.x=>5.69.alpha. But OK to skip alpha2, beta2, beta3, etc --- diff --git a/tools/bin/scripts/set-version.php b/tools/bin/scripts/set-version.php index 489867d015..3e5b0cd453 100755 --- a/tools/bin/scripts/set-version.php +++ b/tools/bin/scripts/set-version.php @@ -83,7 +83,7 @@ updateFile("sql/test_data_second_domain.mysql", function ($content) use ($newVer }); // Update core extensions if this is a stable release -$infoXmls = isPreRelease($newVersion) ? [] : findCoreInfoXml(); +$infoXmls = isPreReleaseIncrement($newVersion) ? [] : findCoreInfoXml(); foreach ($infoXmls as $infoXml) { updateXmlFile($infoXml, function (DOMDocument $dom) use ($newVersion) { // Update extension version @@ -192,8 +192,8 @@ function isVersionValid($v) { return $v && preg_match('/^[0-9a-z\.\-]+$/', $v); } -function isPreRelease(string $v): bool { - return (bool) preg_match('/[a-z]+/', $v); +function isPreReleaseIncrement(string $v): bool { + return (bool) preg_match('/(alpha|beta)/', $v) && !preg_match('/(beta1|alpha1)$/', $v); } /**