chore: cascade main → dev (492f1cb) [skip ci] #55

Merged
jmiller merged 1 commits from main into dev 2026-05-23 20:43:46 +00:00
+25 -9
View File
@@ -64,16 +64,32 @@ if ($suffix !== '' && !str_ends_with($version, $suffix)) {
$root = realpath($path) ?: $path;
// Detect platform
// Detect platform — check manifest.xml first, then legacy .mokostandards
$platform = '';
$mokoStandards = "{$root}/.github/.mokostandards";
if (!file_exists($mokoStandards)) {
$mokoStandards = "{$root}/.mokostandards";
// New format: .mokogitea/manifest.xml (XML with <platform> tag)
$manifestXml = "{$root}/.mokogitea/manifest.xml";
if (file_exists($manifestXml)) {
$xml = @simplexml_load_file($manifestXml);
if ($xml && isset($xml->governance->platform)) {
$platform = (string) $xml->governance->platform;
}
}
if (file_exists($mokoStandards)) {
$content = file_get_contents($mokoStandards);
if (preg_match('/^platform:\s*(.+)/m', $content, $m)) {
$platform = trim($m[1], " \t\n\r\"'");
// Legacy: .mokostandards YAML file
if (empty($platform)) {
$mokoStandards = "{$root}/.github/.mokostandards";
if (!file_exists($mokoStandards)) {
$mokoStandards = "{$root}/.mokogitea/.mokostandards";
}
if (!file_exists($mokoStandards)) {
$mokoStandards = "{$root}/.mokostandards";
}
if (file_exists($mokoStandards)) {
$content = file_get_contents($mokoStandards);
if (preg_match('/^platform:\s*(.+)/m', $content, $m)) {
$platform = trim($m[1], " \t\n\r\"'");
}
}
}
@@ -116,7 +132,7 @@ if ($platform === 'crm-module') {
}
// Joomla: <version> in XML manifests
if ($platform === 'waas-component') {
if (in_array($platform, ['waas-component', 'joomla'], true)) {
foreach (glob("{$root}/src/*.xml") ?: glob("{$root}/*.xml") ?: [] as $file) {
$content = file_get_contents($file);
if (!str_contains($content, '<extension')) continue;