diff --git a/README.md b/README.md
index a4c8bd8..7611cae 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@ DEFGROUP: MokoStandards.Root
INGROUP: MokoStandards
REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform
PATH: /README.md
-VERSION: 09.02.08
+VERSION: 09.02.09
BRIEF: Project overview and documentation
-->
diff --git a/cli/release_cascade.php b/cli/release_cascade.php
index 8295983..db96629 100644
--- a/cli/release_cascade.php
+++ b/cli/release_cascade.php
@@ -131,7 +131,7 @@ foreach ($tagsToDelete as $tag) {
// ── Version-aware cleanup: delete releases with lesser version numbers ───────
if ($version !== null) {
// Normalize version for comparison (strip any suffix)
- $baseVersion = preg_replace('/-[a-z]+$/', '', $version);
+ $baseVersion = preg_replace('/(-(dev|alpha|beta|rc))+$/', '', $version);
// Check all channels (including ones not in the cascade map for this stability)
$allChannels = ['development', 'alpha', 'beta', 'release-candidate', 'stable'];
diff --git a/cli/version_bump.php b/cli/version_bump.php
index 5674635..b6a24db 100644
--- a/cli/version_bump.php
+++ b/cli/version_bump.php
@@ -31,7 +31,7 @@ $mokoManifest = "{$root}/.mokogitea/manifest.xml";
$mokoContent = '';
if (file_exists($mokoManifest)) {
$mokoContent = file_get_contents($mokoManifest);
- if (preg_match('|(\d{2}\.\d{2}\.\d{2})(?:-([a-z]+))?|', $mokoContent, $m)) {
+ if (preg_match('|(\d{2}\.\d{2}\.\d{2})(?:-((?:(?:dev|alpha|beta|rc)-?)+))?|', $mokoContent, $m)) {
$mokoVersion = $m[1];
$mokoSuffix = isset($m[2]) ? $m[2] : '';
}
@@ -64,7 +64,7 @@ foreach ($manifestFiles as $xmlFile) {
if (strpos($xmlContent, '') === false) {
continue;
}
- if (preg_match('|(\d{2}\.\d{2}\.\d{2})(-[a-z]+)?|', $xmlContent, $xm)) {
+ if (preg_match('|(\d{2}\.\d{2}\.\d{2})((?:-(?:dev|alpha|beta|rc))+)?|', $xmlContent, $xm)) {
$candidate = $xm[1];
if ($manifestVersion === null || version_compare($candidate, $manifestVersion, '>')) {
$manifestVersion = $candidate;
@@ -120,7 +120,7 @@ $newFull = $new;
// -- Update .mokogitea/manifest.xml (canonical — preserves suffix) --
if (file_exists($mokoManifest) && !empty($mokoContent)) {
$updated = preg_replace(
- '|\d{2}\.\d{2}\.\d{2}(?:-[a-z]+)?|',
+ '|\d{2}\.\d{2}\.\d{2}(?:(?:-(?:dev|alpha|beta|rc))+)?|',
"{$newFull}",
$mokoContent,
1
@@ -131,7 +131,7 @@ if (file_exists($mokoManifest) && !empty($mokoContent)) {
// -- Update README.md --
if (file_exists($readme) && !empty($readmeContent)) {
$updated = preg_replace(
- '/(VERSION:\s*)\d{2}\.\d{2}\.\d{2}(?:-[a-z]+)?/m',
+ '/(VERSION:\s*)\d{2}\.\d{2}\.\d{2}(?:(?:-(?:dev|alpha|beta|rc))+)?/m',
'${1}' . $newFull,
$readmeContent,
1
@@ -156,7 +156,7 @@ foreach ($xmlPatterns as $pattern) {
continue;
}
$newContent = preg_replace(
- '|\d{2}\.\d{2}\.\d{2}(?:-[a-z]+)?|',
+ '|\d{2}\.\d{2}\.\d{2}(?:(?:-(?:dev|alpha|beta|rc))+)?|',
"{$newFull}",
$content
);
@@ -176,7 +176,7 @@ $packageJsonFile = "{$root}/package.json";
if (file_exists($packageJsonFile)) {
$pkgContent = file_get_contents($packageJsonFile);
$updatedPkg = preg_replace(
- '/("version"\s*:\s*")\d{2}\.\d{2}\.\d{2}(?:-[a-z]+)?(")/m',
+ '/("version"\s*:\s*")\d{2}\.\d{2}\.\d{2}(?:(?:-(?:dev|alpha|beta|rc))+)?(")/m',
'${1}' . $newFull . '${2}',
$pkgContent
);
@@ -191,7 +191,7 @@ $pyprojectFile = "{$root}/pyproject.toml";
if (file_exists($pyprojectFile)) {
$pyContent = file_get_contents($pyprojectFile);
$updatedPy = preg_replace(
- '/^(version\s*=\s*")\d{2}\.\d{2}\.\d{2}(?:-[a-z]+)?(")/m',
+ '/^(version\s*=\s*")\d{2}\.\d{2}\.\d{2}(?:(?:-(?:dev|alpha|beta|rc))+)?(")/m',
'${1}' . $newFull . '${2}',
$pyContent
);
diff --git a/cli/version_check.php b/cli/version_check.php
index 07bc853..e5e2379 100644
--- a/cli/version_check.php
+++ b/cli/version_check.php
@@ -59,7 +59,7 @@ foreach ($xmlGlobs as $glob) {
$xmlContent = file_get_contents($file);
if (strpos($xmlContent, '(\d{2}\.\d{2}\.\d{2})(?:-[a-z]+)?|', $xmlContent, $xm)) {
+ if (preg_match('|(\d{2}\.\d{2}\.\d{2})(?:(?:-(?:dev|alpha|beta|rc))+)?|', $xmlContent, $xm)) {
$relPath = str_replace($root . '/', '', $file);
$relPath = str_replace($root . '\\', '', $relPath);
$versions[$relPath] = $xm[1];
diff --git a/cli/version_read.php b/cli/version_read.php
index bdc2350..5c76856 100644
--- a/cli/version_read.php
+++ b/cli/version_read.php
@@ -30,7 +30,7 @@ if (file_exists($mokoManifest)) {
$xml = @simplexml_load_file($mokoManifest);
if ($xml !== false) {
$v = (string)($xml->identity->version ?? '');
- if (preg_match('/^\d{2}\.\d{2}\.\d{2}(-[a-z]+)?$/', $v)) {
+ if (preg_match('/^\d{2}\.\d{2}\.\d{2}((?:-(?:dev|alpha|beta|rc))+)?$/', $v)) {
$mokoVersion = $v;
}
}
@@ -66,10 +66,10 @@ foreach ($manifestFiles as $xmlFile) {
if (strpos($xmlContent, '') === false) {
continue;
}
- if (preg_match('|(\d{2}\.\d{2}\.\d{2}(?:-[a-z]+)?)|', $xmlContent, $xm)) {
+ if (preg_match('|(\d{2}\.\d{2}\.\d{2}(?:(?:-(?:dev|alpha|beta|rc))+)?)|', $xmlContent, $xm)) {
$candidate = $xm[1];
- $candidateBase = preg_replace('/-[a-z]+$/', '', $candidate);
- $currentBase = $manifestVersion ? preg_replace('/-[a-z]+$/', '', $manifestVersion) : null;
+ $candidateBase = preg_replace('/(-(dev|alpha|beta|rc))+$/', '', $candidate);
+ $currentBase = $manifestVersion ? preg_replace('/(-(dev|alpha|beta|rc))+$/', '', $manifestVersion) : null;
if ($currentBase === null || version_compare($candidateBase, $currentBase, '>')) {
$manifestVersion = $candidate;
}
@@ -119,7 +119,7 @@ if ($version === null) {
// -- Backfill: if manifest.xml exists but lacks , insert it --
if (file_exists($mokoManifest)) {
$content = file_get_contents($mokoManifest);
- if (!preg_match('|\d{2}\.\d{2}\.\d{2}(-[a-z]+)?|', $content)) {
+ if (!preg_match('|\d{2}\.\d{2}\.\d{2}((?:-(?:dev|alpha|beta|rc))+)?|', $content)) {
if (strpos($content, '