/[drupal]/contributions/modules/provision/platform/clone.provision.inc
ViewVC logotype

Contents of /contributions/modules/provision/platform/clone.provision.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.5 - (show annotations) (download) (as text)
Sat Oct 24 05:43:40 2009 UTC (4 weeks, 4 days ago) by anarcat
Branch: MAIN
Changes since 1.4: +1 -1 lines
File MIME type: text/x-php
Revert "workaround for #485646 - pass the commandline arguments for the DB to deploy so we can force the database server manually"

This makes the *master* password show up on the commandline. Bad. We'll need to find another way.

This reverts commit 0eb09b06887129160ac0ea5ac555e35c45cb8d46.
1 <?php
2
3 /**
4 * Clone command implementation
5 *
6 * This command when called will
7 * 1. Make a backup of the current site, before modifications are made.
8 * 2. Execute 'provision deploy' to build the new site using the backup of the old site.
9 *
10 */
11
12 /**
13 * Make sure we have a valid site being cloned, and that the file being cloned from exists
14 */
15 function drush_provision_drupal_provision_clone_validate($url = null, $new_url = null, $platform = null) {
16 drush_bootstrap(DRUSH_BOOTSTRAP_DRUPAL_SITE);
17 }
18
19 /**
20 * Make a backup before making any changes, and add extract the file we are restoring from
21 */
22 function drush_provision_drupal_pre_provision_clone($url, $new_url, $platform = null) {
23 drush_invoke('provision backup', $url);
24 }
25
26 /**
27 * Remove the extracted site directory
28 */
29 function drush_provision_drupal_pre_provision_clone_rollback($url, $new_url, $platform = null) {
30 $success = provision_path("unlink", drush_get_option('backup_file'), TRUE, dt('Removed unused clone site package'), dt('Could not remove unused clone site package'));
31 }
32
33 /**
34 * Switch the clone directories around now that we have the new db installed
35 */
36 function drush_provision_drupal_provision_clone($url, $new_url, $platform = null) {
37 # note that we reset the aliases so they don't conflict with the original site
38 drush_backend_invoke('provision deploy', array($new_url, drush_get_option('backup_file'), 'root' => $platform, 'aliases' => array(),
39 'web_host' => drush_get_option('web_host'), 'web_ip' => drush_get_option('web_ip'),
40 'db_host' => drush_get_option('db_host')));
41 }

  ViewVC Help
Powered by ViewVC 1.1.2