Skip to content

Commit

Permalink
Support split checkouts now too.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed May 8, 2017
1 parent 40c24ab commit 49f7c33
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions framework/Core/lib/Horde/Core/Db/Migration.php
Expand Up @@ -46,7 +46,8 @@ class Horde_Core_Db_Migration
* directories and builds lists of migrateable modules and directories.
*
* @param string $basedir Base directory of a Git checkout. If provided
* a framework/ sub directory is searched for
* either a framework/ sub directory or the base
* folder for a split checkout is searched for
* migration scripts too.
* @param string $pearconf Path to a PEAR configuration file.
*/
Expand All @@ -69,8 +70,14 @@ public function __construct($basedir = null, $pearconf = null)

// Loop through local framework checkout.
if ($basedir) {
// Support both the split repo and monolithic for now.
if (file_exists($basedir . '/applications') && !file_exists($basedir . '/.git')) {
$path = $basedir . '/*/migration';
} else {
$path = $basedir . '/framework/*/migration';
}
$packageFile = new PEAR_PackageFile($pear);
foreach (glob($basedir . '/framework/*/migration') as $dir) {
foreach (glob($path) as $dir) {
$package = $packageFile->fromPackageFile(
dirname($dir) . '/package.xml', PEAR_VALIDATE_NORMAL
);
Expand Down

0 comments on commit 49f7c33

Please sign in to comment.