Public Access
Merge dev: workflow CLI refactoring, version_bump package.json/pyproject.toml, v09.02.00
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Universal: Cascade Main → Dev / Cascade main → branches (push) Has been cancelled
Platform: moko-platform CI / Gate 1: Code Quality (push) Has been cancelled
Platform: moko-platform CI / Gate 2: Unit Tests (8.1) (push) Has been cancelled
Platform: moko-platform CI / Gate 2: Unit Tests (8.2) (push) Has been cancelled
Platform: moko-platform CI / Gate 2: Unit Tests (8.3) (push) Has been cancelled
Platform: moko-platform CI / Gate 3: Self-Health Check (push) Has been cancelled
Platform: moko-platform CI / Gate 4: Governance (push) Has been cancelled
Platform: moko-platform CI / Gate 5: Template Integrity (push) Has been cancelled
Platform: moko-platform CI / CI Summary (push) Has been cancelled
Generic: Repo Health / Release configuration (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Universal: Cascade Main → Dev / Cascade main → branches (push) Has been cancelled
Platform: moko-platform CI / Gate 1: Code Quality (push) Has been cancelled
Platform: moko-platform CI / Gate 2: Unit Tests (8.1) (push) Has been cancelled
Platform: moko-platform CI / Gate 2: Unit Tests (8.2) (push) Has been cancelled
Platform: moko-platform CI / Gate 2: Unit Tests (8.3) (push) Has been cancelled
Platform: moko-platform CI / Gate 3: Self-Health Check (push) Has been cancelled
Platform: moko-platform CI / Gate 4: Governance (push) Has been cancelled
Platform: moko-platform CI / Gate 5: Template Integrity (push) Has been cancelled
Platform: moko-platform CI / CI Summary (push) Has been cancelled
Generic: Repo Health / Release configuration (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
This commit is contained in:
@@ -276,7 +276,7 @@ jobs:
|
|||||||
[ "$BRANCH" = "$CURRENT_BRANCH" ] && continue
|
[ "$BRANCH" = "$CURRENT_BRANCH" ] && continue
|
||||||
echo "Syncing updates.xml -> ${BRANCH}"
|
echo "Syncing updates.xml -> ${BRANCH}"
|
||||||
git fetch origin "${BRANCH}" 2>/dev/null || continue
|
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
|
git checkout "${CURRENT_BRANCH}" -- updates.xml
|
||||||
if ! git diff --quiet updates.xml 2>/dev/null; then
|
if ! git diff --quiet updates.xml 2>/dev/null; then
|
||||||
git add updates.xml
|
git add updates.xml
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ DEFGROUP: MokoStandards.Root
|
|||||||
INGROUP: MokoStandards
|
INGROUP: MokoStandards
|
||||||
REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform
|
REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform
|
||||||
PATH: /README.md
|
PATH: /README.md
|
||||||
VERSION: 09.01.00
|
VERSION: 09.02.00
|
||||||
BRIEF: Project overview and documentation
|
BRIEF: Project overview and documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
|||||||
@@ -160,5 +160,35 @@ if (!empty($updatedFiles)) {
|
|||||||
fwrite(STDERR, "Updated " . count($updatedFiles) . " Joomla manifest(s): " . implode(', ', $updatedFiles) . "\n");
|
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";
|
echo "{$old} -> {$new}\n";
|
||||||
exit(0);
|
exit(0);
|
||||||
|
|||||||
+33
-8
@@ -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 --
|
// -- Output the higher version --
|
||||||
|
$candidates = array_filter([
|
||||||
|
$readmeVersion,
|
||||||
|
$manifestVersion,
|
||||||
|
$packageJsonVersion,
|
||||||
|
$pyprojectVersion,
|
||||||
|
]);
|
||||||
|
|
||||||
$version = null;
|
$version = null;
|
||||||
if ($readmeVersion !== null && $manifestVersion !== null) {
|
foreach ($candidates as $candidate) {
|
||||||
$version = version_compare($manifestVersion, $readmeVersion, '>') ? $manifestVersion : $readmeVersion;
|
if ($version === null || version_compare($candidate, $version, '>')) {
|
||||||
} elseif ($manifestVersion !== null) {
|
$version = $candidate;
|
||||||
$version = $manifestVersion;
|
}
|
||||||
} elseif ($readmeVersion !== null) {
|
|
||||||
$version = $readmeVersion;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($version === null) {
|
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);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// -- Backfill: if manifest.xml exists but lacks <version>, insert it --
|
// -- 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);
|
$content = file_get_contents($mokoManifest);
|
||||||
if (!preg_match('|<version>\d{2}\.\d{2}\.\d{2}</version>|', $content)) {
|
if (!preg_match('|<version>\d{2}\.\d{2}\.\d{2}</version>|', $content)) {
|
||||||
if (strpos($content, '<license') !== false) {
|
if (strpos($content, '<license') !== false) {
|
||||||
|
|||||||
Reference in New Issue
Block a user