Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
P
provision
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
1
Merge Requests
1
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
provision
Commits
a62e7e39
Commit
a62e7e39
authored
Jun 07, 2010
by
drumm
Committed by
Neil Drumm
Jun 07, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only sync the relevant sites directory.
parent
6e0d3d0e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
6 deletions
+25
-6
file/file.drush.inc
file/file.drush.inc
+6
-1
file/remote/remote_service.inc
file/remote/remote_service.inc
+9
-2
platform/provision_drupal.drush.inc
platform/provision_drupal.drush.inc
+8
-1
provision.inc
provision.inc
+2
-2
No files found.
file/file.drush.inc
View file @
a62e7e39
...
...
@@ -454,8 +454,13 @@ class provisionService_file extends provisionService {
/**
* If necessary, sync files out to a remote server.
*
* @param $path
* Full path to sync.
* @param $exclude_sites
* Exclude sites/*, except sites/*.
*/
function
sync
(
$path
=
NULL
)
{
function
sync
(
$path
=
NULL
,
$exclude_sites
=
FALSE
)
{
if
(
is_null
(
$path
))
{
$path
=
$this
->
config_path
;
}
...
...
file/remote/remote_service.inc
View file @
a62e7e39
<?php
require_once
DRUSH_BASE_PATH
.
'/commands/core/rsync.core.inc'
;
class
provisionService_file_remote
extends
provisionService_file
{
function
init
()
{
$this
->
config_path
=
$this
->
config_path
.
'--'
.
$this
->
remote_host
;
parent
::
init
();
}
function
sync
(
$path
=
NULL
)
{
function
sync
(
$path
=
NULL
,
$exclude_sites
=
FALSE
)
{
if
(
is_null
(
$path
))
{
$path
=
$this
->
config_path
;
}
if
(
drush_shell_exec
(
'rsync -azC --delete %s/ %s@%s:%s'
,
$path
,
$this
->
script_user
,
$this
->
remote_host
,
$path
))
{
$options
=
array
(
'delete'
=>
TRUE
,
'exclude-sites'
=>
$exclude_sites
,
);
if
(
drush_core_call_rsync
(
escapeshellarg
(
$path
.
'/'
),
escapeshellarg
(
$this
->
script_user
.
'@'
.
$this
->
remote_host
.
':'
.
$path
),
$options
))
{
drush_log
(
dt
(
'@path has been synced to remote server.'
,
array
(
'@path'
=>
$path
)));
}
else
{
...
...
platform/provision_drupal.drush.inc
View file @
a62e7e39
...
...
@@ -171,6 +171,13 @@ function _provision_drupal_site_installed() {
return
FALSE
;
}
function
provision_drupal_sync_site
()
{
d
()
->
service
(
'file'
)
->
sync
(
d
()
->
root
,
TRUE
);
if
(
d
()
->
type
===
'site'
)
{
d
()
->
service
(
'file'
)
->
sync
(
d
()
->
root
.
'/sites/'
.
d
()
->
uri
);
}
}
/**
* Generate a settings file for the site.
*
...
...
@@ -183,7 +190,7 @@ function _provision_drupal_site_installed() {
function
_provision_drupal_create_settings_file
()
{
$config
=
new
provisionConfig_drupal_settings
(
d
()
->
name
);
$config
->
write
();
d
()
->
service
(
'file'
)
->
sync
(
d
()
->
root
);
provision_drupal_sync_site
(
);
}
class
provisionConfig_drupal_settings
extends
provisionConfig
{
...
...
provision.inc
View file @
a62e7e39
...
...
@@ -43,7 +43,7 @@ function provision_save_site_data() {
if
(
!
drush_get_error
())
{
$config
=
new
provisionConfig_drushrc_site
(
d
()
->
name
);
$config
->
write
();
d
()
->
service
(
'file'
)
->
sync
(
d
()
->
root
);
provision_drupal_sync_site
(
);
}
}
...
...
@@ -55,7 +55,7 @@ function provision_save_platform_data() {
if
(
!
drush_get_error
())
{
$config
=
new
provisionConfig_drushrc_platform
(
d
()
->
name
);
$config
->
write
();
d
()
->
service
(
'file'
)
->
sync
(
d
()
->
root
);
provision_drupal_sync_site
(
);
}
}
...
...
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