From 9edd504bdd8bf8b446472e41afc38d8f93fcbbdd Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Thu, 17 Oct 2024 09:19:05 +1100 Subject: [PATCH] Add Support for Joomla5 builds --- src/CiviDistManagerBundle/Controller/CheckController.php | 2 ++ src/CiviDistManagerBundle/RevDocRepository.php | 3 ++- .../Tests/Controller/CheckControllerTest.php | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/CiviDistManagerBundle/Controller/CheckController.php b/src/CiviDistManagerBundle/Controller/CheckController.php index 1ca93f9..a94d6cb 100644 --- a/src/CiviDistManagerBundle/Controller/CheckController.php +++ b/src/CiviDistManagerBundle/Controller/CheckController.php @@ -180,6 +180,8 @@ protected function getLatestStable() { self::STABLE_DOWNLOAD_URL, $rev, $rev), 'Joomla' => sprintf('%s/%s/civicrm-%s-joomla.zip', self::STABLE_DOWNLOAD_URL, $rev, $rev), + 'Joomla5' => sprintf('%s/%s/civicrm-%s-joomla5.zip', + self::STABLE_DOWNLOAD_URL, $rev, $rev), // 'Joomla-Alt' => 'https://download.civicrm.org/civicrm-4.7.12-joomla-alt.zip', 'L10n' => sprintf('%s/%s/civicrm-%s-l10n.tar.gz', self::STABLE_DOWNLOAD_URL, $rev, $rev), diff --git a/src/CiviDistManagerBundle/RevDocRepository.php b/src/CiviDistManagerBundle/RevDocRepository.php index d26f21c..c5a1696 100644 --- a/src/CiviDistManagerBundle/RevDocRepository.php +++ b/src/CiviDistManagerBundle/RevDocRepository.php @@ -146,7 +146,7 @@ public function createRevDocs() { * Ex: 'Drupal' or 'Drupal6'. */ protected function getTarName($file) { - if (!preg_match(';^civicrm-(.*)-(backdrop|drupal|drupal6|joomla|joomla-alt|standalone|starterkit|wordpress|wporg|l10n)(-[0-9]+)?\.(zip|tar.gz|tgz)$;i', $file['basename'], $matches)) { + if (!preg_match(';^civicrm-(.*)-(backdrop|drupal|drupal6|joomla|joomla5|joomla-alt|standalone|starterkit|wordpress|wporg|l10n)(-[0-9]+)?\.(zip|tar.gz|tgz)$;i', $file['basename'], $matches)) { return NULL; } $cms = $matches[2]; @@ -155,6 +155,7 @@ protected function getTarName($file) { 'drupal' => 'Drupal', 'drupal6' => 'Drupal6', 'joomla' => 'Joomla', + 'joomla5' => 'Joomla5', 'joomla-alt' => 'JoomlaAlt', 'standalone' => 'Standalone', 'starterkit' => 'StarterKit', diff --git a/src/CiviDistManagerBundle/Tests/Controller/CheckControllerTest.php b/src/CiviDistManagerBundle/Tests/Controller/CheckControllerTest.php index 789e3fc..4d2cf6f 100644 --- a/src/CiviDistManagerBundle/Tests/Controller/CheckControllerTest.php +++ b/src/CiviDistManagerBundle/Tests/Controller/CheckControllerTest.php @@ -44,6 +44,7 @@ public function getDownloadExamples() { $cases[7] = array('civicrm-RC-wordpress.zip', ';/civicrm-(\d|\.|alpha|beta)+-wordpress-?\d*.zip;'); $cases[8] = array('civicrm-RC-joomla.zip', ';/civicrm-(\d|\.|alpha|beta)+-joomla-?\d*.zip;'); $cases[9] = array('civicrm-RC-backdrop.tar.gz', ';/civicrm-(\d|\.|alpha|beta)+-backdrop-\d*.tar.gz;'); + $cases[10] = array('civicrm-RC-joomla5.zip', ';/civicrm-(\d|\.|alpha|beta)+-joomla5-?\d*.zip;'); // $cases[10] = array('civicrm-46NIGHTLY-drupal.tar.gz', ';/civicrm-build/4.6/civicrm-[\d\.]+-drupal-\d+.tar.gz;'); return $cases;