5 Commits
v03 ... dev

Author SHA1 Message Date
Jonathan Miller
894597536e feat: unlock MokoCassiopeia + lock MokoOnyx during bridge migration
Some checks failed
Repo Health / Access control (push) Successful in 1s
Repo Health / Release configuration (push) Failing after 3s
Repo Health / Scripts governance (push) Successful in 3s
Repo Health / Repository health (push) Failing after 3s
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-21 17:05:57 -05:00
Jonathan Miller
ca5614db73 feat: cascading channel updates in release.yml
Some checks failed
Repo Health / Access control (push) Successful in 1s
Repo Health / Release configuration (push) Failing after 3s
Repo Health / Scripts governance (push) Successful in 3s
Repo Health / Repository health (push) Failing after 3s
stable → all channels, rc → rc+below, beta → beta+below, etc.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-21 16:52:09 -05:00
Jonathan Miller
e0627da41b All channels point to stable release — ensures every site sees the update
Some checks failed
Repo Health / Access control (push) Successful in 0s
Repo Health / Release configuration (push) Failing after 3s
Repo Health / Scripts governance (push) Successful in 3s
Repo Health / Repository health (push) Failing after 3s
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-21 16:47:02 -05:00
Jonathan Miller
66e1496c43 chore: remove all update channels except stable — repo retired
Some checks failed
Repo Health / Access control (push) Successful in 0s
Repo Health / Release configuration (push) Failing after 3s
Repo Health / Scripts governance (push) Successful in 3s
Repo Health / Repository health (push) Failing after 3s
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-21 16:43:08 -05:00
gitea-actions[bot]
f76e2b6c05 chore: update stable SHA-256 for 03.10.23 [skip ci] 2026-04-21 21:39:08 +00:00
3 changed files with 107 additions and 88 deletions

View File

@@ -375,6 +375,7 @@ jobs:
exit 0
fi
# Cascading channels: each stability updates itself and all lower levels
export PY_STABILITY="$STABILITY" PY_VERSION="$VERSION" PY_SHA256="$SHA256" \
PY_ZIP_NAME="$ZIP_NAME" PY_TAG="$TAG" PY_DATE="$DATE" \
PY_GITEA_ORG="$GITEA_ORG" PY_GITEA_REPO="$GITEA_REPO"
@@ -390,73 +391,53 @@ jobs:
gitea_org = os.environ["PY_GITEA_ORG"]
gitea_repo = os.environ["PY_GITEA_REPO"]
# Map stability to the <tag> value in updates.xml
tag_map = {
"development": "development",
"alpha": "alpha",
"beta": "beta",
"rc": "rc",
"stable": "stable",
# Cascade map: each level updates itself + all lower levels
cascade = {
"stable": ["development", "alpha", "beta", "rc", "stable"],
"rc": ["development", "alpha", "beta", "rc"],
"beta": ["development", "alpha", "beta"],
"alpha": ["development", "alpha"],
"development": ["development"],
}
xml_tag = tag_map.get(stability, "development")
targets = cascade.get(stability, [stability])
with open("updates.xml", "r") as f:
content = f.read()
# Build regex to find the specific <update> block for this stability tag
# Use negative lookahead to avoid matching across multiple <update> blocks
block_pattern = r"(<update>(?:(?!</update>).)*?<tag>" + re.escape(xml_tag) + r"</tag>.*?</update>)"
match = re.search(block_pattern, content, re.DOTALL)
if not match:
print(f"No <update> block found for <tag>{xml_tag}</tag>")
exit(0)
block = match.group(1)
original_block = block
# Update version
block = re.sub(r"<version>[^<]*</version>", f"<version>{version}</version>", block)
# Update creation date
block = re.sub(r"<creationDate>[^<]*</creationDate>", f"<creationDate>{date}</creationDate>", block)
# Update or add SHA-256
if "<sha256>" in block:
block = re.sub(r"<sha256>[^<]*</sha256>", f"<sha256>{sha256}</sha256>", block)
else:
block = block.replace("</downloads>", f"</downloads>\n <sha256>{sha256}</sha256>")
# Update Gitea download URL
gitea_url = f"https://git.mokoconsulting.tech/{gitea_org}/{gitea_repo}/releases/download/{tag}/{zip_name}"
block = re.sub(
r"(<downloadurl[^>]*>)https://git\.mokoconsulting\.tech/[^<]*(</downloadurl>)",
rf"\g<1>{gitea_url}\g<2>",
block
)
# Update GitHub download URL only for RC and stable (others are Gitea-only)
if stability in ("rc", "stable"):
gh_url = f"https://github.com/mokoconsulting-tech/{gitea_repo}/releases/download/{tag}/{zip_name}"
for xml_tag in targets:
block_pattern = r"(<update>(?:(?!</update>).)*?<tag>" + re.escape(xml_tag) + r"</tag>.*?</update>)"
match = re.search(block_pattern, content, re.DOTALL)
if not match:
print(f"No block for <tag>{xml_tag}</tag> — skipping")
continue
block = match.group(1)
original = block
block = re.sub(r"<version>[^<]*</version>", f"<version>{version}</version>", block)
block = re.sub(r"<creationDate>[^<]*</creationDate>", f"<creationDate>{date}</creationDate>", block)
if "<sha256>" in block:
block = re.sub(r"<sha256>[^<]*</sha256>", f"<sha256>{sha256}</sha256>", block)
else:
block = block.replace("</downloads>", f"</downloads>\n <sha256>{sha256}</sha256>")
block = re.sub(
r"(<downloadurl[^>]*>)https://github\.com/[^<]*(</downloadurl>)",
rf"\g<1>{gh_url}\g<2>",
block
)
else:
# Remove any GitHub download URL for dev/alpha/beta
block = re.sub(
r"\n\s*<downloadurl[^>]*>https://github\.com/[^<]*</downloadurl>",
"",
r"(<downloadurl[^>]*>)https://git\.mokoconsulting\.tech/[^<]*(</downloadurl>)",
rf"\g<1>{gitea_url}\g<2>",
block
)
content = content.replace(original_block, block)
content = content.replace(original, block)
print(f"Updated {xml_tag} channel")
with open("updates.xml", "w") as f:
f.write(content)
print(f"Updated {xml_tag} channel: version={version}, sha={sha256[:16]}..., date={date}")
print(f"Cascaded {stability} → {', '.join(targets)}: v={version}, sha={sha256[:16]}...")
PYEOF
- name: "Commit updates.xml to current branch and main"

View File

@@ -122,11 +122,14 @@ class Tpl_MokocassiopeiaInstallerScript implements InstallerScriptInterface
// 5. Redirect update server to MokoOnyx
$this->updateUpdateServer();
// 6. Notify
// 6. Unlock MokoCassiopeia (allow uninstall) + lock MokoOnyx (prevent accidental uninstall)
$this->updateExtensionLocks();
// 7. Notify
$app->enqueueMessage(
'<strong>MokoOnyx has been installed as a replacement for MokoCassiopeia.</strong><br>'
. 'Your template settings have been migrated. MokoOnyx is now your active site template.<br>'
. 'You can safely uninstall MokoCassiopeia from Extensions &rarr; Manage.',
. 'MokoCassiopeia has been unlocked — you can uninstall it from Extensions &rarr; Manage.',
'success'
);
@@ -362,6 +365,42 @@ class Tpl_MokocassiopeiaInstallerScript implements InstallerScriptInterface
}
}
private function updateExtensionLocks(): void
{
$db = Factory::getDbo();
// Unlock MokoCassiopeia — allow uninstall
try {
$query = $db->getQuery(true)
->update('#__extensions')
->set($db->quoteName('locked') . ' = 0')
->set($db->quoteName('protected') . ' = 0')
->where($db->quoteName('element') . ' = ' . $db->quote(self::OLD_NAME))
->where($db->quoteName('type') . ' = ' . $db->quote('template'));
$db->setQuery($query)->execute();
if ($db->getAffectedRows() > 0) {
$this->log('Bridge: unlocked MokoCassiopeia (can be uninstalled).');
}
} catch (\Throwable $e) {
$this->log('Bridge: failed to unlock MokoCassiopeia: ' . $e->getMessage(), 'warning');
}
// Lock MokoOnyx — prevent accidental uninstall
try {
$query = $db->getQuery(true)
->update('#__extensions')
->set($db->quoteName('locked') . ' = 1')
->where($db->quoteName('element') . ' = ' . $db->quote(self::NEW_NAME))
->where($db->quoteName('type') . ' = ' . $db->quote('template'));
$db->setQuery($query)->execute();
if ($db->getAffectedRows() > 0) {
$this->log('Bridge: locked MokoOnyx (protected from uninstall).');
}
} catch (\Throwable $e) {
$this->log('Bridge: failed to lock MokoOnyx: ' . $e->getMessage(), 'warning');
}
}
// ── Logging ────────────────────────────────────────────────────────
private function log(string $message, string $priority = 'info'): void

View File

@@ -1,25 +1,28 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
SPDX-License-Identifier: GPL-3.0-or-later
VERSION: 03.10.18
VERSION: 03.10.23
NOTE: This repository is RETIRED. All channels point to the same final stable release.
All future development is at https://git.mokoconsulting.tech/MokoConsulting/MokoOnyx
-->
<updates>
<!-- 1. DEVELOPMENT — dev → -->
<!-- All channels point to the same final release so every site sees the update -->
<update>
<name>MokoCassiopeia</name>
<description>MokoCassiopeia development build — unstable.</description>
<description>MokoCassiopeia is retired. Please install MokoOnyx instead.</description>
<element>mokocassiopeia</element>
<type>template</type>
<client>site</client>
<version>03.10.21</version>
<version>03.10.23</version>
<creationDate>2026-04-21</creationDate>
<infourl title='MokoCassiopeia Dev'>https://git.mokoconsulting.tech/MokoConsulting/MokoCassiopeia/releases/tag/development</infourl>
<infourl title='MokoCassiopeia'>https://git.mokoconsulting.tech/MokoConsulting/MokoCassiopeia/releases/tag/v03</infourl>
<downloads>
<downloadurl type='full' format='zip'>https://git.mokoconsulting.tech/MokoConsulting/MokoCassiopeia/releases/download/development/mokocassiopeia-03.10.21-dev.zip</downloadurl>
<downloadurl type='full' format='zip'>https://git.mokoconsulting.tech/MokoConsulting/MokoCassiopeia/releases/download/v03/mokocassiopeia-03.10.23.zip</downloadurl>
</downloads>
<sha256>2d21714719dd3e3d87228e1d021d5fc69a96a837a9ec2d5880da733eb28fa5d0</sha256>
<sha256>314ead3bafbaea370796b7ed9d8353ae9964becbf7ccf9be09e94229973440fc</sha256>
<tags><tag>development</tag></tags>
<maintainer>Moko Consulting</maintainer>
<maintainerurl>https://mokoconsulting.tech</maintainerurl>
@@ -27,20 +30,19 @@
<php_minimum>8.1</php_minimum>
</update>
<!-- 2. ALPHA — dev → alpha → -->
<update>
<name>MokoCassiopeia</name>
<description>MokoCassiopeia alpha build — early testing.</description>
<description>MokoCassiopeia is retired. Please install MokoOnyx instead.</description>
<element>mokocassiopeia</element>
<type>template</type>
<client>site</client>
<version>03.10.13</version>
<creationDate>2026-04-19</creationDate>
<infourl title='MokoCassiopeia Alpha'>https://git.mokoconsulting.tech/MokoConsulting/MokoCassiopeia/releases/tag/alpha</infourl>
<version>03.10.23</version>
<creationDate>2026-04-21</creationDate>
<infourl title='MokoCassiopeia'>https://git.mokoconsulting.tech/MokoConsulting/MokoCassiopeia/releases/tag/v03</infourl>
<downloads>
<downloadurl type='full' format='zip'>https://git.mokoconsulting.tech/MokoConsulting/MokoCassiopeia/releases/download/alpha/mokocassiopeia-03.10.13.zip</downloadurl>
<downloadurl type='full' format='zip'>https://git.mokoconsulting.tech/MokoConsulting/MokoCassiopeia/releases/download/v03/mokocassiopeia-03.10.23.zip</downloadurl>
</downloads>
<sha256></sha256>
<sha256>314ead3bafbaea370796b7ed9d8353ae9964becbf7ccf9be09e94229973440fc</sha256>
<tags><tag>alpha</tag></tags>
<maintainer>Moko Consulting</maintainer>
<maintainerurl>https://mokoconsulting.tech</maintainerurl>
@@ -48,20 +50,19 @@
<php_minimum>8.1</php_minimum>
</update>
<!-- 3. BETA — dev → alpha → beta → -->
<update>
<name>MokoCassiopeia</name>
<description>MokoCassiopeia beta build — feature complete, stability testing.</description>
<description>MokoCassiopeia is retired. Please install MokoOnyx instead.</description>
<element>mokocassiopeia</element>
<type>template</type>
<client>site</client>
<version>03.10.13</version>
<creationDate>2026-04-19</creationDate>
<infourl title='MokoCassiopeia Beta'>https://git.mokoconsulting.tech/MokoConsulting/MokoCassiopeia/releases/tag/beta</infourl>
<version>03.10.23</version>
<creationDate>2026-04-21</creationDate>
<infourl title='MokoCassiopeia'>https://git.mokoconsulting.tech/MokoConsulting/MokoCassiopeia/releases/tag/v03</infourl>
<downloads>
<downloadurl type='full' format='zip'>https://git.mokoconsulting.tech/MokoConsulting/MokoCassiopeia/releases/download/beta/mokocassiopeia-03.10.13.zip</downloadurl>
<downloadurl type='full' format='zip'>https://git.mokoconsulting.tech/MokoConsulting/MokoCassiopeia/releases/download/v03/mokocassiopeia-03.10.23.zip</downloadurl>
</downloads>
<sha256></sha256>
<sha256>314ead3bafbaea370796b7ed9d8353ae9964becbf7ccf9be09e94229973440fc</sha256>
<tags><tag>beta</tag></tags>
<maintainer>Moko Consulting</maintainer>
<maintainerurl>https://mokoconsulting.tech</maintainerurl>
@@ -69,20 +70,19 @@
<php_minimum>8.1</php_minimum>
</update>
<!-- 4. RC — dev → alpha → beta → rc → -->
<update>
<name>MokoCassiopeia</name>
<description>MokoCassiopeia release candidate — testing only.</description>
<description>MokoCassiopeia is retired. Please install MokoOnyx instead.</description>
<element>mokocassiopeia</element>
<type>template</type>
<client>site</client>
<version>03.10.13</version>
<creationDate>2026-04-19</creationDate>
<infourl title='MokoCassiopeia RC'>https://git.mokoconsulting.tech/MokoConsulting/MokoCassiopeia/releases/tag/release-candidate</infourl>
<version>03.10.23</version>
<creationDate>2026-04-21</creationDate>
<infourl title='MokoCassiopeia'>https://git.mokoconsulting.tech/MokoConsulting/MokoCassiopeia/releases/tag/v03</infourl>
<downloads>
<downloadurl type='full' format='zip'>https://git.mokoconsulting.tech/MokoConsulting/MokoCassiopeia/releases/download/release-candidate/mokocassiopeia-03.10.13.zip</downloadurl>
<downloadurl type='full' format='zip'>https://git.mokoconsulting.tech/MokoConsulting/MokoCassiopeia/releases/download/v03/mokocassiopeia-03.10.23.zip</downloadurl>
</downloads>
<sha256></sha256>
<sha256>314ead3bafbaea370796b7ed9d8353ae9964becbf7ccf9be09e94229973440fc</sha256>
<tags><tag>rc</tag></tags>
<maintainer>Moko Consulting</maintainer>
<maintainerurl>https://mokoconsulting.tech</maintainerurl>
@@ -90,20 +90,19 @@
<php_minimum>8.1</php_minimum>
</update>
<!-- 5. STABLE — dev → alpha → beta → rc → version/XX → main -->
<update>
<name>MokoCassiopeia</name>
<description>Moko Consulting's site template based on Cassiopeia.</description>
<description>MokoCassiopeia is retired. Please install MokoOnyx instead.</description>
<element>mokocassiopeia</element>
<type>template</type>
<client>site</client>
<version>03.10.13</version>
<creationDate>2026-04-19</creationDate>
<version>03.10.23</version>
<creationDate>2026-04-21</creationDate>
<infourl title='MokoCassiopeia'>https://git.mokoconsulting.tech/MokoConsulting/MokoCassiopeia/releases/tag/v03</infourl>
<downloads>
<downloadurl type='full' format='zip'>https://git.mokoconsulting.tech/MokoConsulting/MokoCassiopeia/releases/download/v03/mokocassiopeia-03.10.13.zip</downloadurl>
<downloadurl type='full' format='zip'>https://git.mokoconsulting.tech/MokoConsulting/MokoCassiopeia/releases/download/v03/mokocassiopeia-03.10.23.zip</downloadurl>
</downloads>
<sha256></sha256>
<sha256>314ead3bafbaea370796b7ed9d8353ae9964becbf7ccf9be09e94229973440fc</sha256>
<tags><tag>stable</tag></tags>
<maintainer>Moko Consulting</maintainer>
<maintainerurl>https://mokoconsulting.tech</maintainerurl>