Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
provision
Commits
966c7493
Commit
966c7493
authored
Apr 15, 2009
by
Adrian Rossouw
Committed by
adrian
Apr 15, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only do provision init stuff when the command is provision something
parent
bf2e5a65
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
20 deletions
+27
-20
platform/provision_drupal.drush.inc
platform/provision_drupal.drush.inc
+26
-19
platform/update.provision.inc
platform/update.provision.inc
+1
-1
No files found.
platform/provision_drupal.drush.inc
View file @
966c7493
...
...
@@ -48,18 +48,22 @@ function provision_drupal_drush_engine_drupal() {
* for populating the $data context array
*/
function
provision_drupal_drush_init
(
$url
=
NULL
)
{
$command
=
drush_get_command
();
$command
=
explode
(
" "
,
$command
[
'command'
]);
if
(
$command
[
0
]
==
'provision'
)
{
if
(
$url
)
{
drush_set_option
(
'uri'
,
'http://'
.
$url
);
provision_load_site_data
(
$url
);
drush_set_default
(
'site_url'
,
$url
);
drush_set_default
(
'profile'
,
'default'
);
drush_set_default
(
'language'
,
'en'
);
drush_set_default
(
'aliases'
,
array
());
}
if
(
$url
)
{
drush_set_option
(
'uri'
,
'http://'
.
$url
);
provision_load_site_data
(
$url
);
drush_set_default
(
'site_url'
,
$url
);
drush_set_default
(
'profile'
,
'default'
);
drush_set_default
(
'language'
,
'en'
);
drush_set_default
(
'aliases'
,
array
());
define
(
'PROVISION_CONTEXT_SITE'
,
(
$url
)
?
TRUE
:
FALSE
);
define
(
'PROVISION_CONTEXT_PLATFORM'
,
!
PROVISION_CONTEXT_SITE
);
}
define
(
'PROVISION_CONTEXT_SITE'
,
(
$url
)
?
TRUE
:
FALSE
);
define
(
'PROVISION_CONTEXT_PLATFORM'
,
!
PROVISION_CONTEXT_SITE
);
}
/**
...
...
@@ -70,16 +74,19 @@ function provision_drupal_drush_init($url = NULL) {
* files for future runs.
*/
function
provision_drupal_drush_exit
(
$url
=
NULL
)
{
if
(
PROVISION_CONTEXT_SITE
)
{
if
(
drush_get_option
(
'installed'
))
{
drush_set_option
(
'site_url'
,
drush_get_option
(
'site_url'
),
'site'
);
drush_set_option
(
'site_id'
,
drush_get_option
(
'site_id'
),
'site'
);
provision_save_site_data
(
$url
);
$command
=
drush_get_command
();
$command
=
explode
(
" "
,
$command
[
'command'
]);
if
(
$command
[
0
]
==
'provision'
)
{
if
(
PROVISION_CONTEXT_SITE
)
{
if
(
drush_get_option
(
'installed'
))
{
drush_set_option
(
'site_url'
,
drush_get_option
(
'site_url'
),
'site'
);
drush_set_option
(
'site_id'
,
drush_get_option
(
'site_id'
),
'site'
);
provision_save_site_data
(
$url
);
}
}
else
{
_provision_generate_config
();
}
}
else
{
_provision_generate_config
();
}
}
...
...
platform/update.provision.inc
View file @
966c7493
...
...
@@ -6,7 +6,7 @@ function provision_drupal_provision_update_validate() {
function
provision_drupal_provision_update
(
$url
)
{
_provision_drupal_create_settings_file
(
$url
);
drush_backend_invoke
(
"update"
,
array
(
'uri'
=>
"http://
$url
"
));
drush_backend_invoke
(
"update
db
"
,
array
(
'uri'
=>
"http://
$url
"
));
drush_bootstrap
(
DRUSH_BOOTSTRAP_DRUPAL_SITE
);
# drush_include_engine('drupal', 'update');
# drush_include_engine('drupal', 'clear');
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment