Changeset 7766
- Timestamp:
- 03/07/08 15:25:43 (7 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.1/lib/task/project/sfProjectDeployTask.class.php
r7743 r7766 30 30 $this->addOptions(array( 31 31 new sfCommandOption('go', null, sfCommandOption::PARAMETER_NONE, 'Do the deployment'), 32 new sfCommandOption('rsync-dir', null, sfCommandOption::PARAMETER_REQUIRED, 'The directory where to look for rsync*.txt files', 'config'), 32 33 )); 33 34 … … 44 45 The server must be configured in [config/properties.ini|COMMENT]: 45 46 46 [ [production]47 [production] 47 48 host=www.example.com 48 49 port=22 … … 69 70 70 71 You can also create a [rsync.txt|COMMENT] and [rsync_include.txt|COMMENT] files. 72 73 If you need to customize the [rsync*.txt|COMMENT] files based on the server, 74 you can pass a [rsync-dir|COMMENT] option: 75 76 [./symfony project:deploy --go --rsync-dir=config/production production|INFO] 71 77 EOF; 72 78 } … … 128 134 { 129 135 $parameters = '-azC --force --delete'; 130 if (file_exists( 'config/rsync_exclude.txt'))136 if (file_exists($options['rsync-dir'].'/rsync_exclude.txt')) 131 137 { 132 $parameters .= ' --exclude-from=config/rsync_exclude.txt';138 $parameters .= sprintf(' --exclude-from=%s/rsync_exclude.txt', $options['rsync-dir']); 133 139 } 134 140 135 if (file_exists( 'config/rsync_include.txt'))141 if (file_exists($options['rsync-dir'].'/rsync_include.txt')) 136 142 { 137 $parameters .= ' --include-from=config/rsync_include.txt';143 $parameters .= sprintf(' --include-from=%s/rsync_include.txt', $options['rsync-dir']); 138 144 } 139 145 140 if (file_exists( 'config/rsync.txt'))146 if (file_exists($options['rsync-dir'].'/rsync.txt')) 141 147 { 142 $parameters .= ' --files-from=config/rsync.txt';148 $parameters .= sprintf(' --files-from=%s/rsync.txt', $options['rsync-dir']); 143 149 } 144 150 }