Commit 4f055e98 authored by Adrian Rossouw's avatar Adrian Rossouw Committed by adrian

better module version support

parent ea388166
...@@ -326,8 +326,23 @@ function provision_drupal_provision_verify($url, &$data) { ...@@ -326,8 +326,23 @@ function provision_drupal_provision_verify($url, &$data) {
} }
$profiles = file_scan_directory('./profiles', '\.profile$', array('.', '..', 'CVS', '.svn'), 0, TRUE, 'name', 0); $profiles = file_scan_directory('./profiles', '\.profile$', array('.', '..', 'CVS', '.svn'), 0, TRUE, 'name', 0);
$data['profiles'] = $profiles; $data['profiles'] = $profiles;
$modules = module_rebuild_cache();
foreach ($modules as $modulename => $file) { $data['modules'] = _provision_drupal_get_cvs_versions(module_rebuild_cache());
// Find theme engines
$data['engines'] = drupal_system_listing('\.engine$', 'themes/engines');
$data['themes'] = system_theme_data();
}
function provision_drupal_restore($url, $backup_file, &$data) {
provision_shell_exec("tar -zxf %s -C sites/%s", $backup_file, $url); # checkout over old sites dir.
}
function _provision_drupal_get_cvs_versions($files) {
foreach ($files as $modulename => $file) {
$project = array(); $project = array();
$project['filename'] = $file->filename; $project['filename'] = $file->filename;
$project['name'] = $file->name; $project['name'] = $file->name;
...@@ -336,11 +351,8 @@ function provision_drupal_provision_verify($url, &$data) { ...@@ -336,11 +351,8 @@ function provision_drupal_provision_verify($url, &$data) {
} }
_cvs_deploy_version_alter($file->info['version'], $project); _cvs_deploy_version_alter($file->info['version'], $project);
$name = ($project['project']) ? $project['project'] : $modulename; $name = ($project['project']) ? $project['project'] : $modulename;
$modules[$name] = $file; $files[$name] = $file;
} }
$data['modules'] = $modules;
}
function provision_drupal_restore($url, $backup_file, &$data) { return $files;
provision_shell_exec("tar -zxf %s -C sites/%s", $backup_file, $url); # checkout over old sites dir.
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment