Merge dev: workflow CLI refactoring, version_bump package.json/pyproject.toml, v09.02.00
Platform: moko-platform CI / Gate 2: Unit Tests (8.1) (push) Blocked by required conditions
Platform: moko-platform CI / Gate 2: Unit Tests (8.2) (push) Blocked by required conditions
Platform: moko-platform CI / Gate 2: Unit Tests (8.3) (push) Blocked by required conditions
Platform: moko-platform CI / Gate 3: Self-Health Check (push) Blocked by required conditions
Platform: moko-platform CI / Gate 4: Governance (push) Blocked by required conditions
Platform: moko-platform CI / Gate 5: Template Integrity (push) Blocked by required conditions
Platform: moko-platform CI / CI Summary (push) Blocked by required conditions
Generic: Repo Health / Release configuration (push) Blocked by required conditions
Generic: Repo Health / Scripts governance (push) Blocked by required conditions
Generic: Repo Health / Repository health (push) Blocked by required conditions
Generic: Repo Health / Site Health (push) Has been skipped
Generic: Repo Health / Access control (push) Successful in 2s
Universal: Cascade Main → Dev / Cascade main → branches (push) Successful in 3s
Platform: moko-platform CI / Gate 1: Code Quality (push) Failing after 46s

This commit is contained in:
Jonathan Miller
2026-05-26 16:54:15 -05:00
4 changed files with 65 additions and 10 deletions
+1 -1
View File
@@ -276,7 +276,7 @@ jobs:
[ "$BRANCH" = "$CURRENT_BRANCH" ] && continue
echo "Syncing updates.xml -> ${BRANCH}"
git fetch origin "${BRANCH}" 2>/dev/null || continue
git checkout "origin/${BRANCH}" -- . 2>/dev/null || continue
git checkout "origin/${BRANCH}" -- updates.xml 2>/dev/null || continue
git checkout "${CURRENT_BRANCH}" -- updates.xml
if ! git diff --quiet updates.xml 2>/dev/null; then
git add updates.xml
+1 -1
View File
@@ -6,7 +6,7 @@ DEFGROUP: MokoStandards.Root
INGROUP: MokoStandards
REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform
PATH: /README.md
VERSION: 09.01.00
VERSION: 09.02.00
BRIEF: Project overview and documentation
-->
+30
View File
@@ -160,5 +160,35 @@ if (!empty($updatedFiles)) {
fwrite(STDERR, "Updated " . count($updatedFiles) . " Joomla manifest(s): " . implode(', ', $updatedFiles) . "\n");
}
// -- Update package.json (Node.js / MCP) --
$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}(")/m',
'${1}' . $new . '${2}',
$pkgContent
);
if ($updatedPkg !== $pkgContent) {
file_put_contents($packageJsonFile, $updatedPkg);
fwrite(STDERR, "Updated package.json\n");
}
}
// -- Update pyproject.toml (Python) --
$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}(")/m',
'${1}' . $new . '${2}',
$pyContent
);
if ($updatedPy !== $pyContent) {
file_put_contents($pyprojectFile, $updatedPy);
fwrite(STDERR, "Updated pyproject.toml\n");
}
}
echo "{$old} -> {$new}\n";
exit(0);
+33 -8
View File
@@ -74,23 +74,48 @@ foreach ($manifestFiles as $xmlFile) {
}
}
// -- 4. Fallback: package.json (Node.js / MCP) --
$packageJsonVersion = null;
$packageJsonFile = "{$root}/package.json";
if (file_exists($packageJsonFile)) {
$pkgData = json_decode(file_get_contents($packageJsonFile), true);
if (isset($pkgData['version']) && preg_match('/^\d{2}\.\d{2}\.\d{2}$/', $pkgData['version'])) {
$packageJsonVersion = $pkgData['version'];
}
}
// -- 5. Fallback: pyproject.toml (Python) --
$pyprojectVersion = null;
$pyprojectFile = "{$root}/pyproject.toml";
if (file_exists($pyprojectFile)) {
$pyContent = file_get_contents($pyprojectFile);
if (preg_match('/^version\s*=\s*"(\d{2}\.\d{2}\.\d{2})"/m', $pyContent, $pm)) {
$pyprojectVersion = $pm[1];
}
}
// -- Output the higher version --
$candidates = array_filter([
$readmeVersion,
$manifestVersion,
$packageJsonVersion,
$pyprojectVersion,
]);
$version = null;
if ($readmeVersion !== null && $manifestVersion !== null) {
$version = version_compare($manifestVersion, $readmeVersion, '>') ? $manifestVersion : $readmeVersion;
} elseif ($manifestVersion !== null) {
$version = $manifestVersion;
} elseif ($readmeVersion !== null) {
$version = $readmeVersion;
foreach ($candidates as $candidate) {
if ($version === null || version_compare($candidate, $version, '>')) {
$version = $candidate;
}
}
if ($version === null) {
fwrite(STDERR, "No version found in manifest.xml, README.md, or Joomla XML\n");
fwrite(STDERR, "No version found in manifest.xml, README.md, Joomla XML, package.json, or pyproject.toml\n");
exit(1);
}
// -- Backfill: if manifest.xml exists but lacks <version>, insert it --
if ($mokoVersion === null && file_exists($mokoManifest)) {
if (file_exists($mokoManifest)) {
$content = file_get_contents($mokoManifest);
if (!preg_match('|<version>\d{2}\.\d{2}\.\d{2}</version>|', $content)) {
if (strpos($content, '<license') !== false) {