diff --git a/.mokogitea/workflows/issue-branch.yml b/.mokogitea/workflows/issue-branch.yml index 616511b..349f515 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.32.00 +# VERSION: 09.32.01 # BRIEF: Auto-create feature branch when an issue is opened name: "Universal: Issue Branch" diff --git a/README.md b/README.md index c0b26cf..f324a51 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.32.00 +VERSION: 09.32.01 BRIEF: Project overview and documentation --> diff --git a/cli/branch_rename.php b/cli/branch_rename.php index 52a4b32..82abf2d 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.32.00 + * VERSION: 09.32.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 9a2f3f1..e8dbf28 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.32.00 + * VERSION: 09.32.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 faf5269..ddd9ac7 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.32.00 + * VERSION: 09.32.01 * BRIEF: Trigger a workflow across multiple repos at once */ diff --git a/cli/client_dashboard.php b/cli/client_dashboard.php index 97ce0e1..b592074 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.32.00 + * VERSION: 09.32.01 * BRIEF: Generate unified client dashboard HTML */ diff --git a/cli/client_inventory.php b/cli/client_inventory.php index 3c3eb1f..23cc5e9 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.32.00 + * VERSION: 09.32.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 82db6b1..e245dd0 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.32.00 + * VERSION: 09.32.01 * BRIEF: Provision a new client environment end-to-end */ diff --git a/cli/grafana_dashboard.php b/cli/grafana_dashboard.php index 90d3fdc..f26b515 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.32.00 + * VERSION: 09.32.01 * BRIEF: Manage Grafana dashboards via API */ diff --git a/cli/joomla_build.php b/cli/joomla_build.php index 4b69a17..fbdd491 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.32.00 + * VERSION: 09.32.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 4a2b9b4..ea57f31 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.32.00 + * VERSION: 09.32.01 * BRIEF: Validate MokoGitea repo metadata against Joomla extension manifest XML */ diff --git a/cli/manifest_detect.php b/cli/manifest_detect.php index 09eeaf5..b85a026 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.32.00 + * VERSION: 09.32.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 555dbf9..071402e 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.32.00 + * VERSION: 09.32.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 ee0228c..0f36449 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.32.00 + * VERSION: 09.32.01 * BRIEF: Ensure licensing tags (updateservers, dlid) in Joomla extension manifests */ diff --git a/cli/manifest_read.php b/cli/manifest_read.php index fb63935..70be688 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.32.00 + * VERSION: 09.32.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 edad9f6..adbdb5c 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.32.00 + * VERSION: 09.32.01 * BRIEF: Auto-detect repository platform type and optionally update manifest */ diff --git a/cli/release_cascade.php b/cli/release_cascade.php index bdcc068..6dc5999 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.32.00 + * VERSION: 09.32.01 * BRIEF: Cascade release zip to all lower stability channels */ diff --git a/cli/release_publish.php b/cli/release_publish.php index f9f156b..7fc2691 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.32.00 + * VERSION: 09.32.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 01a5994..94550b7 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.32.00 + * VERSION: 09.32.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 7a6b0d3..59ca4d7 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.32.00 + * VERSION: 09.32.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 190e5e5..640978d 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.32.00 + * VERSION: 09.32.01 * BRIEF: Auto patch-bump, set stability suffix, and commit — single CLI replacing inline workflow bash */ diff --git a/cli/version_check.php b/cli/version_check.php index 0c5b4d2..ebd0779 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.32.00 + * VERSION: 09.32.01 * BRIEF: Validate version consistency across README, manifests, and sub-packages */ diff --git a/cli/wiki_sync.php b/cli/wiki_sync.php index 0916fa9..4c25e1a 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.32.00 + * VERSION: 09.32.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 a168d11..25765c2 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.32.00 + * VERSION: 09.32.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 50caa26..72de919 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.32.00 + * VERSION: 09.32.01 * BRIEF: Snapshot Joomla directories before deployment for rollback capability */ diff --git a/deploy/deploy-dolibarr.php b/deploy/deploy-dolibarr.php index e31243c..1eb6dad 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.32.00 + * VERSION: 09.32.01 * BRIEF: Deploy Dolibarr module files to a remote server via SFTP/rsync */ diff --git a/deploy/deploy-sftp.php b/deploy/deploy-sftp.php index 48bb5ce..9f0f996 100644 --- a/deploy/deploy-sftp.php +++ b/deploy/deploy-sftp.php @@ -66,8 +66,16 @@ class DeploySftp extends CliFramework */ protected function run(): int { - $repoPath = $this->resolveRepoPath(); - $srcDir = $this->resolveSrcDir($repoPath); + $repoPath = $this->resolveRepoPath(); + $srcDir = $this->resolveSrcDir($repoPath); + $env = strtolower($this->getArgument('--env', '') ?: ''); + + // Multi-target: LIVE_TARGETS env var overrides config file for live deploys + $liveTargets = getenv('LIVE_TARGETS') ?: ''; + if ($liveTargets !== '' && ($env === 'live' || $env === '')) { + return $this->deployMultiTarget($repoPath, $srcDir, $liveTargets); + } + $configPath = $this->resolveConfigPath($repoPath); $this->log("Repository : {$repoPath}"); @@ -130,6 +138,103 @@ class DeploySftp extends CliFramework return $exitCode; } + // ─── Multi-target deploy ──────────────────────────────────────────────── + + /** + * Deploy to multiple live targets from LIVE_TARGETS JSON. + * + * LIVE_TARGETS format (JSON array of objects): + * [ + * {"host": "web1.example.com", "user": "deploy", "remote_path": "/var/www/module/", "ssh_key_file": "~/.ssh/id_rsa"}, + * {"host": "web2.example.com", "user": "deploy", "remote_path": "/var/www/module/", "ssh_key_file": "~/.ssh/id_rsa"} + * ] + * + * @return int POSIX exit code (0 if all targets succeed) + */ + private function deployMultiTarget(string $repoPath, string $srcDir, string $liveTargetsJson): int + { + $targets = json_decode($liveTargetsJson, true); + if (!is_array($targets) || empty($targets)) { + $this->log('ERROR', 'LIVE_TARGETS is not a valid JSON array'); + return self::EXIT_USAGE; + } + + $this->section("Multi-target live deploy ({$this->count($targets)} targets)"); + + $succeeded = 0; + $failed = 0; + + foreach ($targets as $i => $target) { + $host = $target['host'] ?? 'unknown'; + $this->section("Target " . ($i + 1) . ": {$host}"); + + // Merge target config into $this->config for this iteration + $this->config = $target; + + if (!$this->validateConfig()) { + $this->log('ERROR', "Skipping target {$host} — invalid config"); + $failed++; + continue; + } + + $remotePath = rtrim((string) $this->config['remote_path'], '/'); + $ignores = array_merge( + $this->buildIgnorePatterns(), + $this->loadFtpIgnorePatterns($srcDir), + $this->loadFtpIgnorePatterns($repoPath) + ); + + $user = (string) $this->config['user']; + $port = (int) ($this->config['port'] ?? 22); + + if ($this->dryRun) { + $this->log("[DRY RUN] Would deploy to {$user}@{$host}:{$port} → {$remotePath}"); + $succeeded++; + continue; + } + + $sftp = $this->connect($host, $port, $user, $repoPath); + if ($sftp === null) { + $this->log('ERROR', "Failed to connect to {$host}"); + $failed++; + continue; + } + + // Reset counters per target + $this->uploaded = 0; + $this->skipped = 0; + $this->unchanged = 0; + $this->deleted = 0; + + $dirCheck = @$sftp->nlist(dirname($remotePath)); + $baseName = basename($remotePath); + $dirExists = is_array($dirCheck) && in_array($baseName, $dirCheck, true); + if (!$dirExists) { + $sftp->mkdir($remotePath, -1, true); + } + + $exitCode = $this->uploadDirectory($sftp, $srcDir, $remotePath, $srcDir, $ignores); + + $this->log(" {$host}: Uploaded={$this->uploaded} Unchanged={$this->unchanged} Deleted={$this->deleted} Skipped={$this->skipped}"); + + if ($exitCode === 0) { + $succeeded++; + } else { + $failed++; + } + } + + $this->section('Multi-target summary'); + $this->log("Succeeded: {$succeeded}, Failed: {$failed}"); + + return $failed > 0 ? self::EXIT_FAILURE : self::EXIT_SUCCESS; + } + + private function count(array $arr): int + { + return \count($arr); + } + // ─── Private helpers ────────────────────────────────────────────────────── /** @@ -171,8 +276,10 @@ class DeploySftp extends CliFramework /** Map of --env values to their sftp-config filename. */ private const ENV_CONFIG_MAP = [ - 'dev' => 'sftp-config.dev.json', - 'rs' => 'sftp-config.rs.json', + 'dev' => 'sftp-config.dev.json', + 'rs' => 'sftp-config.rs.json', + 'demo' => 'sftp-config.demo.json', + 'live' => 'sftp-config.live.json', ]; /** diff --git a/deploy/health-check.php b/deploy/health-check.php index b8e22b1..5fa1595 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.32.00 + * VERSION: 09.32.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 bfee124..5a17750 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.32.00 + * VERSION: 09.32.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 865044e..e57740b 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.32.00 + * VERSION: 09.32.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 a74f168..6ccbf1f 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.32.00 + VERSION: 09.32.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 2c85edb..ec2d220 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.32.00 +VERSION: 09.32.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 d2dcbcf..271f233 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.32.00 + VERSION: 09.32.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 b11f23f..4e3bae9 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.32.00 +VERSION: 09.32.01 BRIEF: Security vulnerability reporting and handling policy --> diff --git a/templates/scripts/deploy/sftp-config.demo.json.example b/templates/scripts/deploy/sftp-config.demo.json.example new file mode 100644 index 0000000..36c57be --- /dev/null +++ b/templates/scripts/deploy/sftp-config.demo.json.example @@ -0,0 +1,48 @@ +{ + "_template": "Copy this file to scripts/sftp-config/sftp-config.demo.json — it is gitignored", + "_env": "demo", + + "type": "sftp", + + "save_before_upload": false, + "upload_on_save": false, + "sync_down_on_open": false, + "sync_skip_deletes": false, + "sync_same_age": true, + "confirm_downloads": false, + "confirm_sync": true, + "confirm_overwrite_newer": true, + + "host": "YOUR_DEMO_HOST", + "user": "YOUR_DEMO_USERNAME", + "ssh_key_file": "jmiller_private.ppk", + "port": "22", + + "remote_path": "/home/YOUR_USER/YOUR_DEMO_DOMAIN/htdocs/custom/YOUR_MODULE/", + + "ignore_regexes": [ + "\\.sublime-(project|workspace|settings)", + "\\.libsass.json/", + "sftp-config(-alt\\d?)?\\.json", + "sftp-settings\\.json", + "/venv/", + "\\.svn/", + "\\.hg/", + "\\.bzr", + "_darcs", + "CVS", + "\\.DS_Store", + "Thumbs\\.db", + "robots\\.txt", + "desktop\\.ini", + "configuration\\.php", + "\\.ffs*", + "\\.git*", + "\\.editorconfig", + "conf\\.php", + "\\.ps1", + "\\.tx" + ], + + "connect_timeout": 30 +} diff --git a/templates/scripts/deploy/sftp-config.live.json.example b/templates/scripts/deploy/sftp-config.live.json.example new file mode 100644 index 0000000..90914e4 --- /dev/null +++ b/templates/scripts/deploy/sftp-config.live.json.example @@ -0,0 +1,49 @@ +{ + "_template": "Copy this file to scripts/sftp-config/sftp-config.live.json — it is gitignored", + "_env": "live", + "_note": "For multi-instance live deploy, use the LIVE_TARGETS env var instead (JSON array of target objects)", + + "type": "sftp", + + "save_before_upload": false, + "upload_on_save": false, + "sync_down_on_open": false, + "sync_skip_deletes": false, + "sync_same_age": true, + "confirm_downloads": false, + "confirm_sync": true, + "confirm_overwrite_newer": true, + + "host": "YOUR_LIVE_HOST", + "user": "YOUR_LIVE_USERNAME", + "ssh_key_file": "~/.ssh/id_rsa", + "port": "22", + + "remote_path": "/home/YOUR_USER/YOUR_LIVE_DOMAIN/htdocs/custom/YOUR_MODULE/", + + "ignore_regexes": [ + "\\.sublime-(project|workspace|settings)", + "\\.libsass.json/", + "sftp-config(-alt\\d?)?\\.json", + "sftp-settings\\.json", + "/venv/", + "\\.svn/", + "\\.hg/", + "\\.bzr", + "_darcs", + "CVS", + "\\.DS_Store", + "Thumbs\\.db", + "robots\\.txt", + "desktop\\.ini", + "configuration\\.php", + "\\.ffs*", + "\\.git*", + "\\.editorconfig", + "conf\\.php", + "\\.ps1", + "\\.tx" + ], + + "connect_timeout": 30 +} diff --git a/tests/Unit/VersionBumpTest.php b/tests/Unit/VersionBumpTest.php index 8dbf486..58151b5 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 e982a0d..8d4a990 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 65f66c4..711f116 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.32.00 + * VERSION: 09.32.01 * BRIEF: Compare deployed files on a remote server against the local repository to detect drift */