Merge pull request 'Release 02.07.00: Update site fix, settings protection, master god privs' (#42) from dev into main
Joomla: Repo Health / Access control (push) Has been cancelled
Universal: Cascade Main → Dev / Cascade main → branches (push) Has been cancelled
Joomla: Repo Health / Release configuration (push) Has been cancelled
Joomla: Repo Health / Scripts governance (push) Has been cancelled
Joomla: Repo Health / Repository health (push) Has been cancelled
Joomla: Repo Health / Access control (push) Has been cancelled
Universal: Cascade Main → Dev / Cascade main → branches (push) Has been cancelled
Joomla: Repo Health / Release configuration (push) Has been cancelled
Joomla: Repo Health / Scripts governance (push) Has been cancelled
Joomla: Repo Health / Repository health (push) Has been cancelled
This commit was merged in pull request #42.
This commit is contained in:
@@ -292,32 +292,17 @@ jobs:
|
|||||||
|
|
||||||
DOWNLOAD_URL="${GITEA_URL}/${GITEA_ORG}/${GITEA_REPO}/releases/download/${TAG}/${ZIP_NAME}"
|
DOWNLOAD_URL="${GITEA_URL}/${GITEA_ORG}/${GITEA_REPO}/releases/download/${TAG}/${ZIP_NAME}"
|
||||||
|
|
||||||
# Use PHP to update the channel in updates.xml
|
# Use moko-platform CLI to build/update updates.xml (preserves other channels)
|
||||||
php -r '
|
MOKO_CLI="/tmp/moko-platform-api/cli"
|
||||||
$xml_tag = $argv[1];
|
if [ -f "${MOKO_CLI}/updates_xml_build.php" ]; then
|
||||||
$version = $argv[2];
|
php "${MOKO_CLI}/updates_xml_build.php" \
|
||||||
$sha256 = $argv[3];
|
--path . --version "${VERSION}" --stability "${STABILITY}" \
|
||||||
$url = $argv[4];
|
--sha "${SHA256}" \
|
||||||
$date = date("Y-m-d");
|
--gitea-url "${GITEA_URL}" --org "${GITEA_ORG}" --repo "${GITEA_REPO}"
|
||||||
|
echo "Updated ${STABILITY} channel via CLI: version=${VERSION}"
|
||||||
$content = file_get_contents("updates.xml");
|
else
|
||||||
$pattern = "/(<update>(?:(?!<\/update>).)*?<tag>" . preg_quote($xml_tag) . "<\/tag>.*?<\/update>)/s";
|
echo "WARNING: updates_xml_build.php not found — skipping"
|
||||||
|
fi
|
||||||
$content = preg_replace_callback($pattern, function($m) use ($version, $sha256, $url, $date) {
|
|
||||||
$block = $m[0];
|
|
||||||
$block = preg_replace("/<version>[^<]*<\/version>/", "<version>{$version}</version>", $block);
|
|
||||||
if (strpos($block, "<sha256>") !== false) {
|
|
||||||
$block = preg_replace("/<sha256>[^<]*<\/sha256>/", "<sha256>{$sha256}</sha256>", $block);
|
|
||||||
} else {
|
|
||||||
$block = str_replace("</downloads>", "</downloads>\n <sha256>{$sha256}</sha256>", $block);
|
|
||||||
}
|
|
||||||
$block = preg_replace("/(<downloadurl[^>]*>)[^<]*(<\/downloadurl>)/", "\${1}{$url}\${2}", $block);
|
|
||||||
return $block;
|
|
||||||
}, $content);
|
|
||||||
|
|
||||||
file_put_contents("updates.xml", $content);
|
|
||||||
echo "Updated {$xml_tag} channel: version={$version}\n";
|
|
||||||
' "$XML_TAG" "$VERSION" "$SHA256" "$DOWNLOAD_URL"
|
|
||||||
|
|
||||||
# Commit and push
|
# Commit and push
|
||||||
if ! git diff --quiet updates.xml 2>/dev/null; then
|
if ! git diff --quiet updates.xml 2>/dev/null; then
|
||||||
|
|||||||
@@ -41,9 +41,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
### Fixed
|
### Fixed
|
||||||
- Install API endpoint: extract ZIP to temp directory before passing to Joomla Installer (was passing ZIP path directly)
|
- Install API endpoint: extract ZIP to temp directory before passing to Joomla Installer (was passing ZIP path directly)
|
||||||
- Clean up extracted temp directory on success or failure
|
- Clean up extracted temp directory on success or failure
|
||||||
|
- Update site disabled by Joomla when protected=1 — ensureProtectedFlag() now re-enables it
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- CI: auto-release uses stream tag `stable` instead of version tag `vXX`
|
- CI: auto-release uses stream tag `stable` instead of version tag `vXX`
|
||||||
|
- CI: pre-release package build uses absolute paths (fixes relative path zip error)
|
||||||
|
|
||||||
## [02.05.00] - 2026-05-24
|
## [02.05.00] - 2026-05-24
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
DEFGROUP: Joomla.Plugin
|
DEFGROUP: Joomla.Plugin
|
||||||
INGROUP: MokoWaaS
|
INGROUP: MokoWaaS
|
||||||
REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoWaaS
|
REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoWaaS
|
||||||
VERSION: 02.06.03
|
VERSION: 02.05.05
|
||||||
PATH: /README.md
|
PATH: /README.md
|
||||||
BRIEF: MokoWaaS platform plugin for Joomla
|
BRIEF: MokoWaaS platform plugin for Joomla
|
||||||
-->
|
-->
|
||||||
|
|||||||
@@ -1067,6 +1067,8 @@ class MokoWaaS extends CMSPlugin
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
$db = Factory::getDbo();
|
$db = Factory::getDbo();
|
||||||
|
|
||||||
|
// Set protected=1, locked=0 on MokoWaaS extensions
|
||||||
$query = $db->getQuery(true)
|
$query = $db->getQuery(true)
|
||||||
->update($db->quoteName('#__extensions'))
|
->update($db->quoteName('#__extensions'))
|
||||||
->set($db->quoteName('protected') . ' = 1')
|
->set($db->quoteName('protected') . ' = 1')
|
||||||
@@ -1076,6 +1078,18 @@ class MokoWaaS extends CMSPlugin
|
|||||||
->where($db->quoteName('protected') . ' = 0');
|
->where($db->quoteName('protected') . ' = 0');
|
||||||
$db->setQuery($query);
|
$db->setQuery($query);
|
||||||
$db->execute();
|
$db->execute();
|
||||||
|
|
||||||
|
// Ensure update site stays enabled (protected extensions get their update site disabled by Joomla)
|
||||||
|
$query = $db->getQuery(true)
|
||||||
|
->update($db->quoteName('#__update_sites') . ' AS us')
|
||||||
|
->join('INNER', $db->quoteName('#__update_sites_extensions') . ' AS use2 ON us.update_site_id = use2.update_site_id')
|
||||||
|
->join('INNER', $db->quoteName('#__extensions') . ' AS e ON use2.extension_id = e.extension_id')
|
||||||
|
->set('us.enabled = 1')
|
||||||
|
->where('us.enabled = 0')
|
||||||
|
->where('(' . $db->quoteName('e.element') . ' = ' . $db->quote('mokowaas')
|
||||||
|
. ' OR ' . $db->quoteName('e.element') . ' = ' . $db->quote('pkg_mokowaas') . ')');
|
||||||
|
$db->setQuery($query);
|
||||||
|
$db->execute();
|
||||||
}
|
}
|
||||||
catch (\Throwable $e)
|
catch (\Throwable $e)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user