From 46e33a93834ebe09680f3594b47a37b5459038dc Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Sat, 20 Jun 2026 23:31:08 -0500 Subject: [PATCH 1/4] =?UTF-8?q?feat:=20deploy:verify=20=E2=80=94=20deploy?= =?UTF-8?q?=20with=20auto=20health=20check=20and=20rollback=20(#147)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Orchestrates backup → deploy → health-check → rollback-if-failed: - Pre-deploy snapshot via backup-before-deploy.php - Deploy via deploy-sftp.php subprocess - Inline health check with configurable retries and delay - Auto-rollback via rollback-joomla.php if health check fails - Post-rollback verification - Full audit trail via AuditLogger --- bin/moko | 1 + deploy/deploy-and-verify.php | 331 +++++++++++++++++++++++++++++++++++ 2 files changed, 332 insertions(+) create mode 100644 deploy/deploy-and-verify.php diff --git a/bin/moko b/bin/moko index b6a58b6..dd449b8 100644 --- a/bin/moko +++ b/bin/moko @@ -199,6 +199,7 @@ const COMMAND_MAP = [ 'deploy:sftp' => 'deploy/deploy-sftp.php', 'deploy:backup' => 'deploy/backup-before-deploy.php', 'deploy:health-check' => 'deploy/health-check.php', + 'deploy:verify' => 'deploy/deploy-and-verify.php', 'deploy:rollback' => 'deploy/rollback-joomla.php', 'deploy:sync' => 'deploy/sync-joomla.php', diff --git a/deploy/deploy-and-verify.php b/deploy/deploy-and-verify.php new file mode 100644 index 0000000..584f4a6 --- /dev/null +++ b/deploy/deploy-and-verify.php @@ -0,0 +1,331 @@ +#!/usr/bin/env php + + * SPDX-License-Identifier: GPL-3.0-or-later + * FILE INFORMATION + * DEFGROUP: MokoPlatform.Scripts.Deploy + * INGROUP: MokoPlatform + * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli + * PATH: /deploy/deploy-and-verify.php + * BRIEF: Deploy with automatic health check and rollback on failure + */ + +declare(strict_types=1); + +require_once __DIR__ . '/../vendor/autoload.php'; +require_once __DIR__ . '/../lib/Enterprise/CliFramework.php'; + +use MokoCli\{AuditLogger, CliFramework}; + +/** + * Deploy-and-Verify: orchestrates backup → deploy → health-check → rollback. + * + * If the health check fails after deployment, automatically triggers a rollback + * using the pre-deploy snapshot, with full audit trail. + * + * @see https://git.mokoconsulting.tech/MokoConsulting/mokocli/issues/147 + */ +class DeployAndVerify extends CliFramework +{ + private ?AuditLogger $auditLogger = null; + + protected function configure(): void + { + $this->setDescription('Deploy with automatic health check and rollback on failure'); + $this->addArgument('--path', 'Repository root', '.'); + $this->addArgument('--env', 'Target environment: dev, demo, rs, live', ''); + $this->addArgument('--config', 'Explicit sftp-config path (overrides --env)', ''); + $this->addArgument('--url', 'Site URL for health check', ''); + $this->addArgument('--checks', 'Health checks: http,admin,api (comma-sep)', 'http'); + $this->addArgument('--timeout', 'Health check timeout in seconds', '30'); + $this->addArgument('--retries', 'Health check retries before rollback', '2'); + $this->addArgument('--delay', 'Seconds between health check retries', '5'); + } + + protected function run(): int + { + $path = realpath($this->getArgument('--path', '.')) ?: '.'; + $env = $this->getArgument('--env', ''); + $config = $this->getArgument('--config', ''); + $url = $this->getArgument('--url', ''); + $checks = $this->getArgument('--checks', 'http'); + $timeout = (int) $this->getArgument('--timeout', '30'); + $retries = (int) $this->getArgument('--retries', '2'); + $delay = (int) $this->getArgument('--delay', '5'); + + if ($url === '') { + $this->log('ERROR', 'The --url argument is required for health checks'); + return self::EXIT_USAGE; + } + + if ($env === '' && $config === '') { + $this->log('ERROR', 'Specify --env or --config for the deploy target'); + return self::EXIT_USAGE; + } + + try { + $this->auditLogger = new AuditLogger('deploy-and-verify'); + } catch (\Exception $e) { + // Non-fatal — proceed without audit logging + } + + $this->audit('start', ['path' => $path, 'env' => $env, 'url' => $url]); + + // ── Build subprocess args ──────────────────────────────────── + $deployArgs = $this->buildDeployArgs($path, $env, $config); + $healthArgs = $this->buildHealthArgs($url, $checks, $timeout); + + // ── Step 1: Backup ─────────────────────────────────────────── + $this->section('Step 1: Pre-deploy backup'); + $snapshotDir = sys_get_temp_dir() . '/moko_deploy_snapshot_' . date('Ymd_His') . '_' . getmypid(); + + if ($this->dryRun) { + $this->log('INFO', "[dry-run] Would create snapshot at {$snapshotDir}"); + } else { + $backupExit = $this->runSubprocess('backup-before-deploy.php', array_merge( + $deployArgs, ['--snapshot-dir', $snapshotDir] + )); + + if ($backupExit !== 0) { + $this->log('ERROR', 'Pre-deploy backup failed — aborting deployment'); + $this->audit('backup_failed', ['exit_code' => $backupExit]); + return self::EXIT_FAILURE; + } + $this->log('INFO', "Snapshot saved to {$snapshotDir}"); + } + + // ── Step 2: Deploy ─────────────────────────────────────────── + $this->section('Step 2: Deploy'); + + if ($this->dryRun) { + $this->log('INFO', '[dry-run] Would run deploy-sftp.php ' . implode(' ', $deployArgs)); + } else { + $deployExit = $this->runSubprocess('deploy-sftp.php', $deployArgs); + + if ($deployExit !== 0) { + $this->log('ERROR', 'Deploy failed — no rollback needed (files unchanged)'); + $this->audit('deploy_failed', ['exit_code' => $deployExit]); + $this->cleanup($snapshotDir); + return self::EXIT_FAILURE; + } + $this->log('INFO', 'Deploy completed successfully'); + } + + // ── Step 3: Health check (with retries) ────────────────────── + $this->section('Step 3: Health check'); + + if ($this->dryRun) { + $this->log('INFO', "[dry-run] Would check {$url} with checks: {$checks}"); + $this->log('INFO', '[dry-run] Deploy-and-verify complete'); + return self::EXIT_SUCCESS; + } + + $healthy = false; + for ($attempt = 1; $attempt <= $retries; $attempt++) { + $this->log('INFO', "Health check attempt {$attempt}/{$retries}..."); + + if ($attempt > 1) { + $this->log('INFO', "Waiting {$delay}s before retry..."); + sleep($delay); + } + + $healthExit = $this->runHealthCheck($url, $checks, $timeout); + + if ($healthExit === 0) { + $healthy = true; + break; + } + + $this->log('WARNING', "Health check attempt {$attempt} failed (exit {$healthExit})"); + } + + if ($healthy) { + $this->section('Result: SUCCESS'); + $this->log('INFO', 'Health check passed — deploy verified'); + $this->audit('success', ['url' => $url, 'attempts' => $attempt]); + $this->cleanup($snapshotDir); + return self::EXIT_SUCCESS; + } + + // ── Step 4: Rollback ───────────────────────────────────────── + $this->section('Step 4: ROLLBACK'); + $this->log('ERROR', "Health check failed after {$retries} attempts — rolling back"); + $this->audit('rollback_triggered', ['url' => $url, 'retries' => $retries]); + + $rollbackExit = $this->runSubprocess('rollback-joomla.php', array_merge( + $deployArgs, ['--snapshot-dir', $snapshotDir] + )); + + if ($rollbackExit === 0) { + $this->log('INFO', 'Rollback completed — site restored to pre-deploy state'); + $this->audit('rollback_success', []); + + // Verify rollback worked + $postRollbackHealth = $this->runHealthCheck($url, $checks, $timeout); + if ($postRollbackHealth === 0) { + $this->log('INFO', 'Post-rollback health check passed — site is healthy'); + } else { + $this->log('ERROR', 'Post-rollback health check FAILED — manual intervention needed'); + $this->audit('rollback_verification_failed', []); + } + } else { + $this->log('ERROR', 'Rollback FAILED — manual intervention required'); + $this->audit('rollback_failed', ['exit_code' => $rollbackExit]); + } + + $this->cleanup($snapshotDir); + return self::EXIT_FAILURE; + } + + // ── Health check (inline, no subprocess) ───────────────────────── + + private function runHealthCheck(string $url, string $checks, int $timeout): int + { + $url = rtrim($url, '/'); + $checkList = array_map('trim', explode(',', $checks)); + $failed = 0; + + foreach ($checkList as $check) { + $checkUrl = match ($check) { + 'admin' => $url . '/administrator/', + 'api' => $url . '/api/index.php/v1', + default => $url, + }; + + $result = $this->httpGet($checkUrl, $timeout); + + if ($result === null) { + $this->log('ERROR', " [{$check}] FAIL: connection failed"); + $failed++; + continue; + } + + $validCodes = ($check === 'api') ? [200, 401] : [200]; + if (!in_array($result['http_code'], $validCodes, true)) { + $this->log('ERROR', " [{$check}] FAIL: HTTP {$result['http_code']}"); + $failed++; + continue; + } + + if ($this->containsFatalError($result['body'])) { + $this->log('ERROR', " [{$check}] FAIL: PHP fatal error in response"); + $failed++; + continue; + } + + $this->log('INFO', " [{$check}] PASS: HTTP {$result['http_code']} ({$result['time_ms']}ms)"); + } + + return $failed > 0 ? 1 : 0; + } + + private function httpGet(string $url, int $timeout): ?array + { + $ch = curl_init(); + curl_setopt_array($ch, [ + CURLOPT_URL => $url, + CURLOPT_RETURNTRANSFER => true, + CURLOPT_FOLLOWLOCATION => true, + CURLOPT_MAXREDIRS => 5, + CURLOPT_TIMEOUT => $timeout, + CURLOPT_CONNECTTIMEOUT => $timeout, + CURLOPT_SSL_VERIFYPEER => true, + CURLOPT_USERAGENT => 'MokoDeployVerify/1.0', + ]); + + $body = curl_exec($ch); + if (curl_errno($ch)) { + curl_close($ch); + return null; + } + + $httpCode = (int) curl_getinfo($ch, CURLINFO_HTTP_CODE); + $totalTime = curl_getinfo($ch, CURLINFO_TOTAL_TIME); + curl_close($ch); + + return [ + 'http_code' => $httpCode, + 'body' => is_string($body) ? $body : '', + 'time_ms' => (int) round($totalTime * 1000), + ]; + } + + private function containsFatalError(string $body): bool + { + foreach (['Fatal error:', 'Fatal Error', 'Parse error:', 'Uncaught Error:', 'Uncaught Exception:'] as $pattern) { + if (stripos($body, $pattern) !== false) { + return true; + } + } + return false; + } + + // ── Subprocess helpers ─────────────────────────────────────────── + + private function runSubprocess(string $script, array $args): int + { + $scriptPath = __DIR__ . '/' . $script; + if (!is_file($scriptPath)) { + $this->log('ERROR', "Script not found: {$scriptPath}"); + return 127; + } + + $cmd = sprintf('php %s %s 2>&1', + escapeshellarg($scriptPath), + implode(' ', array_map('escapeshellarg', $args)) + ); + + $this->log('DEBUG', "Running: {$cmd}"); + passthru($cmd, $exitCode); + return $exitCode; + } + + private function buildDeployArgs(string $path, string $env, string $config): array + { + $args = ['--path', $path]; + if ($config !== '') { + $args[] = '--config'; + $args[] = $config; + } elseif ($env !== '') { + $args[] = '--env'; + $args[] = $env; + } + if ($this->dryRun) { + $args[] = '--dry-run'; + } + return $args; + } + + private function buildHealthArgs(string $url, string $checks, int $timeout): array + { + return ['--url', $url, '--checks', $checks, '--timeout', (string) $timeout]; + } + + // ── Audit ──────────────────────────────────────────────────────── + + private function audit(string $event, array $data): void + { + if ($this->auditLogger === null) { + return; + } + try { + $this->auditLogger->logInfo("deploy-verify:{$event}", $data); + } catch (\Exception $e) { + // Non-fatal + } + } + + // ── Cleanup ────────────────────────────────────────────────────── + + private function cleanup(string $snapshotDir): void + { + if (is_dir($snapshotDir)) { + exec(sprintf('rm -rf %s', escapeshellarg($snapshotDir))); + $this->log('DEBUG', "Cleaned up snapshot: {$snapshotDir}"); + } + } +} + +$app = new DeployAndVerify('deploy_and_verify', 'Deploy with automatic health check and rollback'); +exit($app->execute()); From 19aa0111f04b7a67243f238ee81e494bc84d8316 Mon Sep 17 00:00:00 2001 From: "gitea-actions[bot]" Date: Sun, 21 Jun 2026 04:31:30 +0000 Subject: [PATCH 2/4] chore(version): auto-bump patch 09.35.01-dev [skip ci] --- .mokogitea/workflows/issue-branch.yml | 2 +- README.md | 2 +- automation/update_dependencies.php | 2 +- cli/branch_rename.php | 2 +- cli/bulk_workflow_push.php | 2 +- cli/bulk_workflow_trigger.php | 2 +- cli/client_dashboard.php | 2 +- cli/client_inventory.php | 2 +- cli/client_provision.php | 2 +- cli/grafana_dashboard.php | 2 +- cli/joomla_build.php | 2 +- cli/joomla_metadata_validate.php | 2 +- cli/manifest_detect.php | 2 +- cli/manifest_integrity.php | 2 +- cli/manifest_licensing.php | 2 +- cli/manifest_read.php | 2 +- cli/platform_detect.php | 2 +- cli/release_cascade.php | 2 +- cli/release_publish.php | 2 +- cli/scaffold_client.php | 2 +- cli/updates_xml_sync.php | 2 +- cli/version_auto_bump.php | 2 +- cli/version_bump.php | 2 +- cli/version_check.php | 2 +- cli/wiki_sync.php | 2 +- cli/workflow_sync.php | 2 +- deploy/backup-before-deploy.php | 2 +- deploy/deploy-dolibarr.php | 2 +- deploy/health-check.php | 2 +- deploy/rollback-joomla.php | 2 +- deploy/sync-joomla.php | 2 +- mcp/servers/mokocrm_api/CONTRIBUTING.md | 2 +- mcp/servers/mokocrm_api/SECURITY.md | 2 +- mcp/servers/mokosuite_api/CONTRIBUTING.md | 2 +- mcp/servers/mokosuite_api/SECURITY.md | 2 +- tests/Unit/VersionBumpTest.php | 2 +- tests/Unit/VersionReadTest.php | 4 ++-- validate/check_file_integrity.php | 2 +- 38 files changed, 39 insertions(+), 39 deletions(-) diff --git a/.mokogitea/workflows/issue-branch.yml b/.mokogitea/workflows/issue-branch.yml index 75a6963..9932fb5 100644 --- a/.mokogitea/workflows/issue-branch.yml +++ b/.mokogitea/workflows/issue-branch.yml @@ -5,7 +5,7 @@ # FILE INFORMATION # DEFGROUP: Gitea.Workflow # INGROUP: mokocli.Automation -# VERSION: 01.00.00 +# VERSION: 09.35.01 # BRIEF: Auto-create feature branch when an issue is opened name: "Universal: Issue Branch" diff --git a/README.md b/README.md index 83f9e5a..31bc5c6 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ DEFGROUP: MokoPlatform.Root INGROUP: MokoPlatform REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform PATH: /README.md -VERSION: 09.35.00 +VERSION: 09.35.01 BRIEF: Project overview and documentation --> diff --git a/automation/update_dependencies.php b/automation/update_dependencies.php index 51cde79..d95a003 100644 --- a/automation/update_dependencies.php +++ b/automation/update_dependencies.php @@ -13,7 +13,7 @@ * INGROUP: MokoPlatform.Scripts * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli * PATH: /automation/update_dependencies.php - * VERSION: 09.35.00 + * VERSION: 09.35.01 * BRIEF: Cross-repo dependency update automation — scan, update, PR, auto-merge */ diff --git a/cli/branch_rename.php b/cli/branch_rename.php index 736096b..3569bd2 100644 --- a/cli/branch_rename.php +++ b/cli/branch_rename.php @@ -10,7 +10,7 @@ * INGROUP: mokoplatform * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform * PATH: /cli/branch_rename.php - * VERSION: 09.35.00 + * VERSION: 09.35.01 * BRIEF: Rename a git branch via Gitea API (create new, update PR, delete old) */ diff --git a/cli/bulk_workflow_push.php b/cli/bulk_workflow_push.php index 7f61196..f1bde3e 100644 --- a/cli/bulk_workflow_push.php +++ b/cli/bulk_workflow_push.php @@ -12,7 +12,7 @@ * INGROUP: mokoplatform * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform * PATH: /cli/bulk_workflow_push.php - * VERSION: 09.35.00 + * VERSION: 09.35.01 * BRIEF: Push a workflow file to all governed repos via the Gitea Contents API */ diff --git a/cli/bulk_workflow_trigger.php b/cli/bulk_workflow_trigger.php index 91ee583..a7fd550 100644 --- a/cli/bulk_workflow_trigger.php +++ b/cli/bulk_workflow_trigger.php @@ -12,7 +12,7 @@ * INGROUP: mokoplatform * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform * PATH: /cli/bulk_workflow_trigger.php - * VERSION: 09.35.00 + * VERSION: 09.35.01 * BRIEF: Trigger a workflow across multiple repos at once */ diff --git a/cli/client_dashboard.php b/cli/client_dashboard.php index 4274565..81ab386 100644 --- a/cli/client_dashboard.php +++ b/cli/client_dashboard.php @@ -12,7 +12,7 @@ * INGROUP: mokoplatform * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform * PATH: /cli/client_dashboard.php - * VERSION: 09.35.00 + * VERSION: 09.35.01 * BRIEF: Generate unified client dashboard HTML */ diff --git a/cli/client_inventory.php b/cli/client_inventory.php index 660dd14..3386eee 100644 --- a/cli/client_inventory.php +++ b/cli/client_inventory.php @@ -12,7 +12,7 @@ * INGROUP: mokoplatform * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform * PATH: /cli/client_inventory.php - * VERSION: 09.35.00 + * VERSION: 09.35.01 * BRIEF: Discover and list all client-waas repos with their server configuration status */ diff --git a/cli/client_provision.php b/cli/client_provision.php index 3efb1d8..da53bc9 100644 --- a/cli/client_provision.php +++ b/cli/client_provision.php @@ -12,7 +12,7 @@ * INGROUP: mokoplatform * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform * PATH: /cli/client_provision.php - * VERSION: 09.35.00 + * VERSION: 09.35.01 * BRIEF: Provision a new client environment end-to-end */ diff --git a/cli/grafana_dashboard.php b/cli/grafana_dashboard.php index c901c90..d2e4816 100644 --- a/cli/grafana_dashboard.php +++ b/cli/grafana_dashboard.php @@ -12,7 +12,7 @@ * INGROUP: mokoplatform * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform * PATH: /cli/grafana_dashboard.php - * VERSION: 09.35.00 + * VERSION: 09.35.01 * BRIEF: Manage Grafana dashboards via API */ diff --git a/cli/joomla_build.php b/cli/joomla_build.php index f8088f6..15ad128 100644 --- a/cli/joomla_build.php +++ b/cli/joomla_build.php @@ -10,7 +10,7 @@ * INGROUP: mokoplatform * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform * PATH: /cli/joomla_build.php - * VERSION: 09.35.00 + * VERSION: 09.35.01 * BRIEF: Build a Joomla extension ZIP from manifest — all types supported * NOTE: Called by pre-release and auto-release workflows. */ diff --git a/cli/joomla_metadata_validate.php b/cli/joomla_metadata_validate.php index 5c55c4d..192caf3 100644 --- a/cli/joomla_metadata_validate.php +++ b/cli/joomla_metadata_validate.php @@ -10,7 +10,7 @@ * INGROUP: mokoplatform * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform * PATH: /cli/joomla_metadata_validate.php - * VERSION: 09.35.00 + * VERSION: 09.35.01 * BRIEF: Validate MokoGitea repo metadata against Joomla extension manifest XML */ diff --git a/cli/manifest_detect.php b/cli/manifest_detect.php index 3a7f0af..5d9c800 100644 --- a/cli/manifest_detect.php +++ b/cli/manifest_detect.php @@ -10,7 +10,7 @@ * INGROUP: mokoplatform * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform * PATH: /cli/manifest_detect.php - * VERSION: 09.35.00 + * VERSION: 09.35.01 * BRIEF: Auto-detect manifest fields from source files and optionally push to API */ diff --git a/cli/manifest_integrity.php b/cli/manifest_integrity.php index c073723..d9f5e59 100644 --- a/cli/manifest_integrity.php +++ b/cli/manifest_integrity.php @@ -10,7 +10,7 @@ * INGROUP: mokoplatform * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform * PATH: /cli/manifest_integrity.php - * VERSION: 09.35.00 + * VERSION: 09.35.01 * BRIEF: Cross-check manifest API fields against repo contents across the org */ diff --git a/cli/manifest_licensing.php b/cli/manifest_licensing.php index 45cbe45..9ba7983 100644 --- a/cli/manifest_licensing.php +++ b/cli/manifest_licensing.php @@ -10,7 +10,7 @@ * INGROUP: mokoplatform * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform * PATH: /cli/manifest_licensing.php - * VERSION: 09.35.00 + * VERSION: 09.35.01 * BRIEF: Ensure licensing tags (updateservers, dlid) in Joomla extension manifests */ diff --git a/cli/manifest_read.php b/cli/manifest_read.php index 6415534..021ca30 100644 --- a/cli/manifest_read.php +++ b/cli/manifest_read.php @@ -10,7 +10,7 @@ * INGROUP: mokocli * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli * PATH: /cli/manifest_read.php - * VERSION: 09.35.00 + * VERSION: 09.35.01 * BRIEF: Read repo metadata from Gitea manifest API, auto-detect the rest */ diff --git a/cli/platform_detect.php b/cli/platform_detect.php index 592aabf..b5001cb 100644 --- a/cli/platform_detect.php +++ b/cli/platform_detect.php @@ -10,7 +10,7 @@ * INGROUP: mokoplatform * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform * PATH: /cli/platform_detect.php - * VERSION: 09.35.00 + * VERSION: 09.35.01 * BRIEF: Auto-detect repository platform type and optionally update manifest */ diff --git a/cli/release_cascade.php b/cli/release_cascade.php index 2b44136..fcab9a5 100644 --- a/cli/release_cascade.php +++ b/cli/release_cascade.php @@ -10,7 +10,7 @@ * INGROUP: mokocli * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli * PATH: /cli/release_cascade.php - * VERSION: 09.35.00 + * VERSION: 09.35.01 * BRIEF: Cascade release zip to all lower stability channels */ diff --git a/cli/release_publish.php b/cli/release_publish.php index d017bfd..8591776 100644 --- a/cli/release_publish.php +++ b/cli/release_publish.php @@ -10,7 +10,7 @@ * INGROUP: mokoplatform * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform * PATH: /cli/release_publish.php - * VERSION: 09.35.00 + * VERSION: 09.35.01 * BRIEF: Publish a release and create copies for all lesser stability streams. */ diff --git a/cli/scaffold_client.php b/cli/scaffold_client.php index f54584f..0bc326d 100644 --- a/cli/scaffold_client.php +++ b/cli/scaffold_client.php @@ -12,7 +12,7 @@ * INGROUP: mokoplatform * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform * PATH: /cli/scaffold_client.php - * VERSION: 09.35.00 + * VERSION: 09.35.01 * BRIEF: Scaffold a new client-waas repo from Template-Client-WaaS with pre-configured settings */ diff --git a/cli/updates_xml_sync.php b/cli/updates_xml_sync.php index 36504b0..e304022 100644 --- a/cli/updates_xml_sync.php +++ b/cli/updates_xml_sync.php @@ -10,7 +10,7 @@ * INGROUP: mokoplatform * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform * PATH: /cli/updates_xml_sync.php - * VERSION: 09.35.00 + * VERSION: 09.35.01 * BRIEF: Sync updates.xml to target branches via Gitea API * NOTE: Called by pre-release and auto-release workflows after updates.xml * is modified on the current branch. Pushes the file to other branches diff --git a/cli/version_auto_bump.php b/cli/version_auto_bump.php index 29b92c7..cc3f802 100644 --- a/cli/version_auto_bump.php +++ b/cli/version_auto_bump.php @@ -10,7 +10,7 @@ * INGROUP: mokoplatform * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform * PATH: /cli/version_auto_bump.php - * VERSION: 09.35.00 + * VERSION: 09.35.01 * BRIEF: Auto patch-bump, set stability suffix, and commit — single CLI replacing inline workflow bash */ diff --git a/cli/version_bump.php b/cli/version_bump.php index 10815e5..76b2cfd 100644 --- a/cli/version_bump.php +++ b/cli/version_bump.php @@ -370,7 +370,7 @@ class VersionBumpCli extends CliFramework /** * Scan git release tags for the highest version across all channels. * - * Checks release names like "MokoSuiteClient (VERSION: 09.35.00)" in + * Checks release names like "MokoSuiteClient (VERSION: 09.35.01)" in * git tags (stable, release-candidate, development, etc.) to find the * highest version that has been released on any channel. */ diff --git a/cli/version_check.php b/cli/version_check.php index 90f71c0..7742dbd 100644 --- a/cli/version_check.php +++ b/cli/version_check.php @@ -10,7 +10,7 @@ * INGROUP: mokoplatform * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform * PATH: /cli/version_check.php - * VERSION: 09.35.00 + * VERSION: 09.35.01 * BRIEF: Validate version consistency across README, manifests, and sub-packages */ diff --git a/cli/wiki_sync.php b/cli/wiki_sync.php index d3f582e..c37d248 100644 --- a/cli/wiki_sync.php +++ b/cli/wiki_sync.php @@ -10,7 +10,7 @@ * INGROUP: mokoplatform * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform * PATH: /cli/wiki_sync.php - * VERSION: 09.35.00 + * VERSION: 09.35.01 * BRIEF: Sync select wiki pages from mokoplatform to all template repos */ diff --git a/cli/workflow_sync.php b/cli/workflow_sync.php index 2c95b73..ab1653a 100644 --- a/cli/workflow_sync.php +++ b/cli/workflow_sync.php @@ -10,7 +10,7 @@ * INGROUP: moko-platform * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /cli/workflow_sync.php - * VERSION: 09.35.00 + * VERSION: 09.35.01 * BRIEF: Sync workflows from Generic → platform templates → live repos based on manifest.platform */ diff --git a/deploy/backup-before-deploy.php b/deploy/backup-before-deploy.php index 8e0f6cf..c6cb673 100644 --- a/deploy/backup-before-deploy.php +++ b/deploy/backup-before-deploy.php @@ -12,7 +12,7 @@ * INGROUP: MokoPlatform * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform * PATH: /deploy/backup-before-deploy.php - * VERSION: 09.35.00 + * VERSION: 09.35.01 * BRIEF: Snapshot Joomla directories before deployment for rollback capability */ diff --git a/deploy/deploy-dolibarr.php b/deploy/deploy-dolibarr.php index 27a48bc..dc495fd 100644 --- a/deploy/deploy-dolibarr.php +++ b/deploy/deploy-dolibarr.php @@ -12,7 +12,7 @@ * INGROUP: MokoPlatform * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform * PATH: /deploy/deploy-dolibarr.php - * VERSION: 09.35.00 + * VERSION: 09.35.01 * BRIEF: Deploy Dolibarr module files to a remote server via SFTP/rsync */ diff --git a/deploy/health-check.php b/deploy/health-check.php index e079448..44d9263 100644 --- a/deploy/health-check.php +++ b/deploy/health-check.php @@ -12,7 +12,7 @@ * INGROUP: MokoPlatform * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform * PATH: /deploy/health-check.php - * VERSION: 09.35.00 + * VERSION: 09.35.01 * BRIEF: Post-deploy health check — verify a Joomla site is responding correctly */ diff --git a/deploy/rollback-joomla.php b/deploy/rollback-joomla.php index e3c07e0..19a217c 100644 --- a/deploy/rollback-joomla.php +++ b/deploy/rollback-joomla.php @@ -12,7 +12,7 @@ * INGROUP: MokoPlatform * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform * PATH: /deploy/rollback-joomla.php - * VERSION: 09.35.00 + * VERSION: 09.35.01 * BRIEF: Rollback a Joomla deployment by restoring from a pre-deploy snapshot */ diff --git a/deploy/sync-joomla.php b/deploy/sync-joomla.php index 6ce9ff9..2003b65 100644 --- a/deploy/sync-joomla.php +++ b/deploy/sync-joomla.php @@ -12,7 +12,7 @@ * INGROUP: MokoPlatform * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform * PATH: /deploy/sync-joomla.php - * VERSION: 09.35.00 + * VERSION: 09.35.01 * BRIEF: Sync Joomla site directories between two servers via rsync over SSH */ diff --git a/mcp/servers/mokocrm_api/CONTRIBUTING.md b/mcp/servers/mokocrm_api/CONTRIBUTING.md index 1dd9bc3..95902e2 100644 --- a/mcp/servers/mokocrm_api/CONTRIBUTING.md +++ b/mcp/servers/mokocrm_api/CONTRIBUTING.md @@ -14,7 +14,7 @@ DEFGROUP: dolibarr-api-mcp.Documentation INGROUP: dolibarr-api-mcp REPO: https://git.mokoconsulting.tech/MokoConsulting/dolibarr-api-mcp - VERSION: 09.35.00 + VERSION: 09.35.01 PATH: ./CONTRIBUTING.md BRIEF: Contribution guidelines for the project --> diff --git a/mcp/servers/mokocrm_api/SECURITY.md b/mcp/servers/mokocrm_api/SECURITY.md index b7a9709..fe002d9 100644 --- a/mcp/servers/mokocrm_api/SECURITY.md +++ b/mcp/servers/mokocrm_api/SECURITY.md @@ -10,7 +10,7 @@ DEFGROUP: dolibarr-api-mcp.Documentation INGROUP: dolibarr-api-mcp REPO: https://git.mokoconsulting.tech/MokoConsulting/dolibarr-api-mcp PATH: /SECURITY.md -VERSION: 09.35.00 +VERSION: 09.35.01 BRIEF: Security vulnerability reporting and handling policy --> diff --git a/mcp/servers/mokosuite_api/CONTRIBUTING.md b/mcp/servers/mokosuite_api/CONTRIBUTING.md index 4341766..13a4197 100644 --- a/mcp/servers/mokosuite_api/CONTRIBUTING.md +++ b/mcp/servers/mokosuite_api/CONTRIBUTING.md @@ -14,7 +14,7 @@ DEFGROUP: INGROUP: Project.Documentation REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoCli-Template-Generic - VERSION: 09.35.00 + VERSION: 09.35.01 PATH: ./CONTRIBUTING.md BRIEF: Contribution guidelines for the project --> diff --git a/mcp/servers/mokosuite_api/SECURITY.md b/mcp/servers/mokosuite_api/SECURITY.md index e130aba..775fa73 100644 --- a/mcp/servers/mokosuite_api/SECURITY.md +++ b/mcp/servers/mokosuite_api/SECURITY.md @@ -23,7 +23,7 @@ DEFGROUP: [PROJECT_NAME] INGROUP: [PROJECT_NAME].Documentation REPO: [REPOSITORY_URL] PATH: /SECURITY.md -VERSION: 09.35.00 +VERSION: 09.35.01 BRIEF: Security vulnerability reporting and handling policy --> diff --git a/tests/Unit/VersionBumpTest.php b/tests/Unit/VersionBumpTest.php index 839ee51..2f63fab 100644 --- a/tests/Unit/VersionBumpTest.php +++ b/tests/Unit/VersionBumpTest.php @@ -63,7 +63,7 @@ class VersionBumpTest extends TestCase { file_put_contents( "{$this->tmpDir}/README.md", - "\nSome content\n" + "\nSome content\n" ); $this->execute(); diff --git a/tests/Unit/VersionReadTest.php b/tests/Unit/VersionReadTest.php index abb4003..5b42ce0 100644 --- a/tests/Unit/VersionReadTest.php +++ b/tests/Unit/VersionReadTest.php @@ -34,7 +34,7 @@ class VersionReadTest extends TestCase { file_put_contents( "{$this->tmpDir}/README.md", - "# Test\n\n" + "# Test\n\n" ); $this->assertSame('02.03.04', trim($this->runScript())); @@ -68,7 +68,7 @@ class VersionReadTest extends TestCase { file_put_contents( "{$this->tmpDir}/README.md", - "\n" + "\n" ); mkdir("{$this->tmpDir}/src", 0755, true); file_put_contents( diff --git a/validate/check_file_integrity.php b/validate/check_file_integrity.php index ef80bce..741d52b 100644 --- a/validate/check_file_integrity.php +++ b/validate/check_file_integrity.php @@ -12,7 +12,7 @@ * INGROUP: MokoPlatform * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform * PATH: /validate/check_file_integrity.php - * VERSION: 09.35.00 + * VERSION: 09.35.01 * BRIEF: Compare deployed files on a remote server against the local repository to detect drift */ From 4fc3d0a4a9624283c1ea7fe49c6e56ffc9eda15e Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Sat, 20 Jun 2026 23:40:54 -0500 Subject: [PATCH 3/4] fix: address review findings in deploy-and-verify.php - Fix #1: replace rm -rf with cross-platform PHP removeDirectory() - Fix #2: sanitize URL in audit log (log hostname only) - Fix #3: remove unused buildHealthArgs() and $healthArgs - Fix #4: add random suffix to snapshot dir name for uniqueness - Fix #5: fix constructor to match CliFramework pattern (no args) - Fix #6: trigger rollback on deploy failure (partial deploy risk) --- deploy/deploy-and-verify.php | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/deploy/deploy-and-verify.php b/deploy/deploy-and-verify.php index 584f4a6..2315404 100644 --- a/deploy/deploy-and-verify.php +++ b/deploy/deploy-and-verify.php @@ -70,15 +70,14 @@ class DeployAndVerify extends CliFramework // Non-fatal — proceed without audit logging } - $this->audit('start', ['path' => $path, 'env' => $env, 'url' => $url]); + $this->audit('start', ['path' => $path, 'env' => $env, 'url' => parse_url($url, PHP_URL_HOST) ?? $url]); // ── Build subprocess args ──────────────────────────────────── $deployArgs = $this->buildDeployArgs($path, $env, $config); - $healthArgs = $this->buildHealthArgs($url, $checks, $timeout); // ── Step 1: Backup ─────────────────────────────────────────── $this->section('Step 1: Pre-deploy backup'); - $snapshotDir = sys_get_temp_dir() . '/moko_deploy_snapshot_' . date('Ymd_His') . '_' . getmypid(); + $snapshotDir = sys_get_temp_dir() . '/moko_deploy_snapshot_' . date('Ymd_His') . '_' . getmypid() . '_' . bin2hex(random_bytes(4)); if ($this->dryRun) { $this->log('INFO', "[dry-run] Would create snapshot at {$snapshotDir}"); @@ -104,8 +103,11 @@ class DeployAndVerify extends CliFramework $deployExit = $this->runSubprocess('deploy-sftp.php', $deployArgs); if ($deployExit !== 0) { - $this->log('ERROR', 'Deploy failed — no rollback needed (files unchanged)'); + $this->log('ERROR', 'Deploy failed — rolling back to pre-deploy state'); $this->audit('deploy_failed', ['exit_code' => $deployExit]); + $this->runSubprocess('rollback-joomla.php', array_merge( + $deployArgs, ['--snapshot-dir', $snapshotDir] + )); $this->cleanup($snapshotDir); return self::EXIT_FAILURE; } @@ -297,11 +299,6 @@ class DeployAndVerify extends CliFramework return $args; } - private function buildHealthArgs(string $url, string $checks, int $timeout): array - { - return ['--url', $url, '--checks', $checks, '--timeout', (string) $timeout]; - } - // ── Audit ──────────────────────────────────────────────────────── private function audit(string $event, array $data): void @@ -321,11 +318,27 @@ class DeployAndVerify extends CliFramework private function cleanup(string $snapshotDir): void { if (is_dir($snapshotDir)) { - exec(sprintf('rm -rf %s', escapeshellarg($snapshotDir))); + $this->removeDirectory($snapshotDir); $this->log('DEBUG', "Cleaned up snapshot: {$snapshotDir}"); } } + + private function removeDirectory(string $dir): void + { + $entries = scandir($dir); + if ($entries === false) { + return; + } + foreach ($entries as $entry) { + if ($entry === '.' || $entry === '..') { + continue; + } + $path = $dir . DIRECTORY_SEPARATOR . $entry; + is_dir($path) ? $this->removeDirectory($path) : unlink($path); + } + rmdir($dir); + } } -$app = new DeployAndVerify('deploy_and_verify', 'Deploy with automatic health check and rollback'); +$app = new DeployAndVerify(); exit($app->execute()); From 8900b12f81307ca87c8028a4c68342517197f53c Mon Sep 17 00:00:00 2001 From: "gitea-actions[bot]" Date: Sun, 21 Jun 2026 04:42:00 +0000 Subject: [PATCH 4/4] chore(version): auto-bump patch 09.35.02-dev [skip ci] --- .mokogitea/workflows/issue-branch.yml | 2 +- README.md | 2 +- automation/update_dependencies.php | 2 +- cli/branch_rename.php | 2 +- cli/bulk_workflow_push.php | 2 +- cli/bulk_workflow_trigger.php | 2 +- cli/client_dashboard.php | 2 +- cli/client_inventory.php | 2 +- cli/client_provision.php | 2 +- cli/grafana_dashboard.php | 2 +- cli/joomla_build.php | 2 +- cli/joomla_metadata_validate.php | 2 +- cli/manifest_detect.php | 2 +- cli/manifest_integrity.php | 2 +- cli/manifest_licensing.php | 2 +- cli/manifest_read.php | 2 +- cli/platform_detect.php | 2 +- cli/release_cascade.php | 2 +- cli/release_publish.php | 2 +- cli/scaffold_client.php | 2 +- cli/updates_xml_sync.php | 2 +- cli/version_auto_bump.php | 2 +- cli/version_bump.php | 2 +- cli/version_check.php | 2 +- cli/wiki_sync.php | 2 +- cli/workflow_sync.php | 2 +- deploy/backup-before-deploy.php | 2 +- deploy/deploy-dolibarr.php | 2 +- deploy/health-check.php | 2 +- deploy/rollback-joomla.php | 2 +- deploy/sync-joomla.php | 2 +- mcp/servers/mokocrm_api/CONTRIBUTING.md | 2 +- mcp/servers/mokocrm_api/SECURITY.md | 2 +- mcp/servers/mokosuite_api/CONTRIBUTING.md | 2 +- mcp/servers/mokosuite_api/SECURITY.md | 2 +- tests/Unit/VersionBumpTest.php | 2 +- tests/Unit/VersionReadTest.php | 4 ++-- validate/check_file_integrity.php | 2 +- 38 files changed, 39 insertions(+), 39 deletions(-) diff --git a/.mokogitea/workflows/issue-branch.yml b/.mokogitea/workflows/issue-branch.yml index 9932fb5..897c734 100644 --- a/.mokogitea/workflows/issue-branch.yml +++ b/.mokogitea/workflows/issue-branch.yml @@ -5,7 +5,7 @@ # FILE INFORMATION # DEFGROUP: Gitea.Workflow # INGROUP: mokocli.Automation -# VERSION: 09.35.01 +# VERSION: 09.35.02 # BRIEF: Auto-create feature branch when an issue is opened name: "Universal: Issue Branch" diff --git a/README.md b/README.md index 31bc5c6..1b2243d 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ DEFGROUP: MokoPlatform.Root INGROUP: MokoPlatform REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform PATH: /README.md -VERSION: 09.35.01 +VERSION: 09.35.02 BRIEF: Project overview and documentation --> diff --git a/automation/update_dependencies.php b/automation/update_dependencies.php index d95a003..5a2daa1 100644 --- a/automation/update_dependencies.php +++ b/automation/update_dependencies.php @@ -13,7 +13,7 @@ * INGROUP: MokoPlatform.Scripts * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli * PATH: /automation/update_dependencies.php - * VERSION: 09.35.01 + * VERSION: 09.35.02 * BRIEF: Cross-repo dependency update automation — scan, update, PR, auto-merge */ diff --git a/cli/branch_rename.php b/cli/branch_rename.php index 3569bd2..88b96fe 100644 --- a/cli/branch_rename.php +++ b/cli/branch_rename.php @@ -10,7 +10,7 @@ * INGROUP: mokoplatform * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform * PATH: /cli/branch_rename.php - * VERSION: 09.35.01 + * VERSION: 09.35.02 * BRIEF: Rename a git branch via Gitea API (create new, update PR, delete old) */ diff --git a/cli/bulk_workflow_push.php b/cli/bulk_workflow_push.php index f1bde3e..1d06e2b 100644 --- a/cli/bulk_workflow_push.php +++ b/cli/bulk_workflow_push.php @@ -12,7 +12,7 @@ * INGROUP: mokoplatform * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform * PATH: /cli/bulk_workflow_push.php - * VERSION: 09.35.01 + * VERSION: 09.35.02 * BRIEF: Push a workflow file to all governed repos via the Gitea Contents API */ diff --git a/cli/bulk_workflow_trigger.php b/cli/bulk_workflow_trigger.php index a7fd550..1d43df9 100644 --- a/cli/bulk_workflow_trigger.php +++ b/cli/bulk_workflow_trigger.php @@ -12,7 +12,7 @@ * INGROUP: mokoplatform * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform * PATH: /cli/bulk_workflow_trigger.php - * VERSION: 09.35.01 + * VERSION: 09.35.02 * BRIEF: Trigger a workflow across multiple repos at once */ diff --git a/cli/client_dashboard.php b/cli/client_dashboard.php index 81ab386..fb50e96 100644 --- a/cli/client_dashboard.php +++ b/cli/client_dashboard.php @@ -12,7 +12,7 @@ * INGROUP: mokoplatform * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform * PATH: /cli/client_dashboard.php - * VERSION: 09.35.01 + * VERSION: 09.35.02 * BRIEF: Generate unified client dashboard HTML */ diff --git a/cli/client_inventory.php b/cli/client_inventory.php index 3386eee..26818eb 100644 --- a/cli/client_inventory.php +++ b/cli/client_inventory.php @@ -12,7 +12,7 @@ * INGROUP: mokoplatform * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform * PATH: /cli/client_inventory.php - * VERSION: 09.35.01 + * VERSION: 09.35.02 * BRIEF: Discover and list all client-waas repos with their server configuration status */ diff --git a/cli/client_provision.php b/cli/client_provision.php index da53bc9..f5bbeee 100644 --- a/cli/client_provision.php +++ b/cli/client_provision.php @@ -12,7 +12,7 @@ * INGROUP: mokoplatform * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform * PATH: /cli/client_provision.php - * VERSION: 09.35.01 + * VERSION: 09.35.02 * BRIEF: Provision a new client environment end-to-end */ diff --git a/cli/grafana_dashboard.php b/cli/grafana_dashboard.php index d2e4816..3bc960f 100644 --- a/cli/grafana_dashboard.php +++ b/cli/grafana_dashboard.php @@ -12,7 +12,7 @@ * INGROUP: mokoplatform * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform * PATH: /cli/grafana_dashboard.php - * VERSION: 09.35.01 + * VERSION: 09.35.02 * BRIEF: Manage Grafana dashboards via API */ diff --git a/cli/joomla_build.php b/cli/joomla_build.php index 15ad128..b7159ca 100644 --- a/cli/joomla_build.php +++ b/cli/joomla_build.php @@ -10,7 +10,7 @@ * INGROUP: mokoplatform * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform * PATH: /cli/joomla_build.php - * VERSION: 09.35.01 + * VERSION: 09.35.02 * BRIEF: Build a Joomla extension ZIP from manifest — all types supported * NOTE: Called by pre-release and auto-release workflows. */ diff --git a/cli/joomla_metadata_validate.php b/cli/joomla_metadata_validate.php index 192caf3..f609339 100644 --- a/cli/joomla_metadata_validate.php +++ b/cli/joomla_metadata_validate.php @@ -10,7 +10,7 @@ * INGROUP: mokoplatform * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform * PATH: /cli/joomla_metadata_validate.php - * VERSION: 09.35.01 + * VERSION: 09.35.02 * BRIEF: Validate MokoGitea repo metadata against Joomla extension manifest XML */ diff --git a/cli/manifest_detect.php b/cli/manifest_detect.php index 5d9c800..0165595 100644 --- a/cli/manifest_detect.php +++ b/cli/manifest_detect.php @@ -10,7 +10,7 @@ * INGROUP: mokoplatform * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform * PATH: /cli/manifest_detect.php - * VERSION: 09.35.01 + * VERSION: 09.35.02 * BRIEF: Auto-detect manifest fields from source files and optionally push to API */ diff --git a/cli/manifest_integrity.php b/cli/manifest_integrity.php index d9f5e59..1bb09c3 100644 --- a/cli/manifest_integrity.php +++ b/cli/manifest_integrity.php @@ -10,7 +10,7 @@ * INGROUP: mokoplatform * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform * PATH: /cli/manifest_integrity.php - * VERSION: 09.35.01 + * VERSION: 09.35.02 * BRIEF: Cross-check manifest API fields against repo contents across the org */ diff --git a/cli/manifest_licensing.php b/cli/manifest_licensing.php index 9ba7983..7d0ac46 100644 --- a/cli/manifest_licensing.php +++ b/cli/manifest_licensing.php @@ -10,7 +10,7 @@ * INGROUP: mokoplatform * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform * PATH: /cli/manifest_licensing.php - * VERSION: 09.35.01 + * VERSION: 09.35.02 * BRIEF: Ensure licensing tags (updateservers, dlid) in Joomla extension manifests */ diff --git a/cli/manifest_read.php b/cli/manifest_read.php index 021ca30..bdbc9d9 100644 --- a/cli/manifest_read.php +++ b/cli/manifest_read.php @@ -10,7 +10,7 @@ * INGROUP: mokocli * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli * PATH: /cli/manifest_read.php - * VERSION: 09.35.01 + * VERSION: 09.35.02 * BRIEF: Read repo metadata from Gitea manifest API, auto-detect the rest */ diff --git a/cli/platform_detect.php b/cli/platform_detect.php index b5001cb..5376d6d 100644 --- a/cli/platform_detect.php +++ b/cli/platform_detect.php @@ -10,7 +10,7 @@ * INGROUP: mokoplatform * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform * PATH: /cli/platform_detect.php - * VERSION: 09.35.01 + * VERSION: 09.35.02 * BRIEF: Auto-detect repository platform type and optionally update manifest */ diff --git a/cli/release_cascade.php b/cli/release_cascade.php index fcab9a5..2629f13 100644 --- a/cli/release_cascade.php +++ b/cli/release_cascade.php @@ -10,7 +10,7 @@ * INGROUP: mokocli * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli * PATH: /cli/release_cascade.php - * VERSION: 09.35.01 + * VERSION: 09.35.02 * BRIEF: Cascade release zip to all lower stability channels */ diff --git a/cli/release_publish.php b/cli/release_publish.php index 8591776..41b50ca 100644 --- a/cli/release_publish.php +++ b/cli/release_publish.php @@ -10,7 +10,7 @@ * INGROUP: mokoplatform * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform * PATH: /cli/release_publish.php - * VERSION: 09.35.01 + * VERSION: 09.35.02 * BRIEF: Publish a release and create copies for all lesser stability streams. */ diff --git a/cli/scaffold_client.php b/cli/scaffold_client.php index 0bc326d..d8eead0 100644 --- a/cli/scaffold_client.php +++ b/cli/scaffold_client.php @@ -12,7 +12,7 @@ * INGROUP: mokoplatform * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform * PATH: /cli/scaffold_client.php - * VERSION: 09.35.01 + * VERSION: 09.35.02 * BRIEF: Scaffold a new client-waas repo from Template-Client-WaaS with pre-configured settings */ diff --git a/cli/updates_xml_sync.php b/cli/updates_xml_sync.php index e304022..a33e80f 100644 --- a/cli/updates_xml_sync.php +++ b/cli/updates_xml_sync.php @@ -10,7 +10,7 @@ * INGROUP: mokoplatform * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform * PATH: /cli/updates_xml_sync.php - * VERSION: 09.35.01 + * VERSION: 09.35.02 * BRIEF: Sync updates.xml to target branches via Gitea API * NOTE: Called by pre-release and auto-release workflows after updates.xml * is modified on the current branch. Pushes the file to other branches diff --git a/cli/version_auto_bump.php b/cli/version_auto_bump.php index cc3f802..0801c97 100644 --- a/cli/version_auto_bump.php +++ b/cli/version_auto_bump.php @@ -10,7 +10,7 @@ * INGROUP: mokoplatform * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform * PATH: /cli/version_auto_bump.php - * VERSION: 09.35.01 + * VERSION: 09.35.02 * BRIEF: Auto patch-bump, set stability suffix, and commit — single CLI replacing inline workflow bash */ diff --git a/cli/version_bump.php b/cli/version_bump.php index 76b2cfd..d5278e8 100644 --- a/cli/version_bump.php +++ b/cli/version_bump.php @@ -370,7 +370,7 @@ class VersionBumpCli extends CliFramework /** * Scan git release tags for the highest version across all channels. * - * Checks release names like "MokoSuiteClient (VERSION: 09.35.01)" in + * Checks release names like "MokoSuiteClient (VERSION: 09.35.02)" in * git tags (stable, release-candidate, development, etc.) to find the * highest version that has been released on any channel. */ diff --git a/cli/version_check.php b/cli/version_check.php index 7742dbd..1269601 100644 --- a/cli/version_check.php +++ b/cli/version_check.php @@ -10,7 +10,7 @@ * INGROUP: mokoplatform * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform * PATH: /cli/version_check.php - * VERSION: 09.35.01 + * VERSION: 09.35.02 * BRIEF: Validate version consistency across README, manifests, and sub-packages */ diff --git a/cli/wiki_sync.php b/cli/wiki_sync.php index c37d248..6e1151f 100644 --- a/cli/wiki_sync.php +++ b/cli/wiki_sync.php @@ -10,7 +10,7 @@ * INGROUP: mokoplatform * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform * PATH: /cli/wiki_sync.php - * VERSION: 09.35.01 + * VERSION: 09.35.02 * BRIEF: Sync select wiki pages from mokoplatform to all template repos */ diff --git a/cli/workflow_sync.php b/cli/workflow_sync.php index ab1653a..50ac988 100644 --- a/cli/workflow_sync.php +++ b/cli/workflow_sync.php @@ -10,7 +10,7 @@ * INGROUP: moko-platform * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /cli/workflow_sync.php - * VERSION: 09.35.01 + * VERSION: 09.35.02 * BRIEF: Sync workflows from Generic → platform templates → live repos based on manifest.platform */ diff --git a/deploy/backup-before-deploy.php b/deploy/backup-before-deploy.php index c6cb673..c48c12f 100644 --- a/deploy/backup-before-deploy.php +++ b/deploy/backup-before-deploy.php @@ -12,7 +12,7 @@ * INGROUP: MokoPlatform * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform * PATH: /deploy/backup-before-deploy.php - * VERSION: 09.35.01 + * VERSION: 09.35.02 * BRIEF: Snapshot Joomla directories before deployment for rollback capability */ diff --git a/deploy/deploy-dolibarr.php b/deploy/deploy-dolibarr.php index dc495fd..2a1cef0 100644 --- a/deploy/deploy-dolibarr.php +++ b/deploy/deploy-dolibarr.php @@ -12,7 +12,7 @@ * INGROUP: MokoPlatform * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform * PATH: /deploy/deploy-dolibarr.php - * VERSION: 09.35.01 + * VERSION: 09.35.02 * BRIEF: Deploy Dolibarr module files to a remote server via SFTP/rsync */ diff --git a/deploy/health-check.php b/deploy/health-check.php index 44d9263..8a53518 100644 --- a/deploy/health-check.php +++ b/deploy/health-check.php @@ -12,7 +12,7 @@ * INGROUP: MokoPlatform * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform * PATH: /deploy/health-check.php - * VERSION: 09.35.01 + * VERSION: 09.35.02 * BRIEF: Post-deploy health check — verify a Joomla site is responding correctly */ diff --git a/deploy/rollback-joomla.php b/deploy/rollback-joomla.php index 19a217c..6b14049 100644 --- a/deploy/rollback-joomla.php +++ b/deploy/rollback-joomla.php @@ -12,7 +12,7 @@ * INGROUP: MokoPlatform * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform * PATH: /deploy/rollback-joomla.php - * VERSION: 09.35.01 + * VERSION: 09.35.02 * BRIEF: Rollback a Joomla deployment by restoring from a pre-deploy snapshot */ diff --git a/deploy/sync-joomla.php b/deploy/sync-joomla.php index 2003b65..f0f0f33 100644 --- a/deploy/sync-joomla.php +++ b/deploy/sync-joomla.php @@ -12,7 +12,7 @@ * INGROUP: MokoPlatform * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform * PATH: /deploy/sync-joomla.php - * VERSION: 09.35.01 + * VERSION: 09.35.02 * BRIEF: Sync Joomla site directories between two servers via rsync over SSH */ diff --git a/mcp/servers/mokocrm_api/CONTRIBUTING.md b/mcp/servers/mokocrm_api/CONTRIBUTING.md index 95902e2..576d018 100644 --- a/mcp/servers/mokocrm_api/CONTRIBUTING.md +++ b/mcp/servers/mokocrm_api/CONTRIBUTING.md @@ -14,7 +14,7 @@ DEFGROUP: dolibarr-api-mcp.Documentation INGROUP: dolibarr-api-mcp REPO: https://git.mokoconsulting.tech/MokoConsulting/dolibarr-api-mcp - VERSION: 09.35.01 + VERSION: 09.35.02 PATH: ./CONTRIBUTING.md BRIEF: Contribution guidelines for the project --> diff --git a/mcp/servers/mokocrm_api/SECURITY.md b/mcp/servers/mokocrm_api/SECURITY.md index fe002d9..07606c4 100644 --- a/mcp/servers/mokocrm_api/SECURITY.md +++ b/mcp/servers/mokocrm_api/SECURITY.md @@ -10,7 +10,7 @@ DEFGROUP: dolibarr-api-mcp.Documentation INGROUP: dolibarr-api-mcp REPO: https://git.mokoconsulting.tech/MokoConsulting/dolibarr-api-mcp PATH: /SECURITY.md -VERSION: 09.35.01 +VERSION: 09.35.02 BRIEF: Security vulnerability reporting and handling policy --> diff --git a/mcp/servers/mokosuite_api/CONTRIBUTING.md b/mcp/servers/mokosuite_api/CONTRIBUTING.md index 13a4197..1e1a045 100644 --- a/mcp/servers/mokosuite_api/CONTRIBUTING.md +++ b/mcp/servers/mokosuite_api/CONTRIBUTING.md @@ -14,7 +14,7 @@ DEFGROUP: INGROUP: Project.Documentation REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoCli-Template-Generic - VERSION: 09.35.01 + VERSION: 09.35.02 PATH: ./CONTRIBUTING.md BRIEF: Contribution guidelines for the project --> diff --git a/mcp/servers/mokosuite_api/SECURITY.md b/mcp/servers/mokosuite_api/SECURITY.md index 775fa73..dbafcfe 100644 --- a/mcp/servers/mokosuite_api/SECURITY.md +++ b/mcp/servers/mokosuite_api/SECURITY.md @@ -23,7 +23,7 @@ DEFGROUP: [PROJECT_NAME] INGROUP: [PROJECT_NAME].Documentation REPO: [REPOSITORY_URL] PATH: /SECURITY.md -VERSION: 09.35.01 +VERSION: 09.35.02 BRIEF: Security vulnerability reporting and handling policy --> diff --git a/tests/Unit/VersionBumpTest.php b/tests/Unit/VersionBumpTest.php index 2f63fab..1b5be73 100644 --- a/tests/Unit/VersionBumpTest.php +++ b/tests/Unit/VersionBumpTest.php @@ -63,7 +63,7 @@ class VersionBumpTest extends TestCase { file_put_contents( "{$this->tmpDir}/README.md", - "\nSome content\n" + "\nSome content\n" ); $this->execute(); diff --git a/tests/Unit/VersionReadTest.php b/tests/Unit/VersionReadTest.php index 5b42ce0..981913e 100644 --- a/tests/Unit/VersionReadTest.php +++ b/tests/Unit/VersionReadTest.php @@ -34,7 +34,7 @@ class VersionReadTest extends TestCase { file_put_contents( "{$this->tmpDir}/README.md", - "# Test\n\n" + "# Test\n\n" ); $this->assertSame('02.03.04', trim($this->runScript())); @@ -68,7 +68,7 @@ class VersionReadTest extends TestCase { file_put_contents( "{$this->tmpDir}/README.md", - "\n" + "\n" ); mkdir("{$this->tmpDir}/src", 0755, true); file_put_contents( diff --git a/validate/check_file_integrity.php b/validate/check_file_integrity.php index 741d52b..9b7f1f0 100644 --- a/validate/check_file_integrity.php +++ b/validate/check_file_integrity.php @@ -12,7 +12,7 @@ * INGROUP: MokoPlatform * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform * PATH: /validate/check_file_integrity.php - * VERSION: 09.35.01 + * VERSION: 09.35.02 * BRIEF: Compare deployed files on a remote server against the local repository to detect drift */