Changeset 4984
- Timestamp:
- 09/05/07 16:09:17 (1 year ago)
- Files:
-
- plugins/sfProjectExportPlugin/README (modified) (1 diff)
- plugins/sfProjectExportPlugin/data/tasks/sfPakeExport.php (modified) (3 diffs)
- plugins/sfProjectExportPlugin/package.xml (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/sfProjectExportPlugin/README
r4974 r4984 25 25 }}} 26 26 27 * You can specify which specific folders or files you want to add with an argument, here is the complete possible list. (optional) Separate options with '+' 28 29 {{{ 30 symfony project-export /folder/to/export/the/project cache+uploads+fixtures+doc+test+command 31 }}} 32 27 33 == Changelog == 28 34 35 === 09-05-2007 | 1.1.3 Stable === 36 37 * Bertrand.Zuchuat: Add options 38 29 39 === 09-04-2007 | 1.1.2 Stable === 30 40 plugins/sfProjectExportPlugin/data/tasks/sfPakeExport.php
r4974 r4984 1 1 <?php 2 /* 3 * (c) 2004-2006 Bertrand Zuchuat <bertrand.zuchuat@funstaff.ch> 4 * 5 * For the full copyright and license information, please view the LICENSE 6 * file that was distributed with this source code. 7 */ 2 8 9 3 10 pake_desc('export freeze project without .svn folder'); 4 11 pake_task('project-export', 'project_exists'); … … 21 28 } 22 29 30 $opts = isset($args[1]) ? explode('+', $args[1]): array(); 31 32 $options = array('cache' => false, 33 'uploads' => false, 34 'fixtures' => false, 35 'doc' => false, 36 'test' => false, 37 'command' => false 38 ); 39 40 if(count($opts) > 0) 41 { 42 foreach($opts AS $key) 43 { 44 $options[$key] = true; 45 } 46 } 47 23 48 $sf_root_dir = sfConfig::get('sf_root_dir'); 24 49 $finder = pakeFinder::type('any')->ignore_version_control()->discard('*_dev.php', '*.php.bak', '*.log'); … … 36 61 37 62 // Delete cache content 38 pake_echo_action('project-export', 'Delete cache folder content'); 39 $sf_cache_dir = $sf_export_path . '/cache'; 40 pake_remove($finder, $sf_cache_dir); 63 if(!$options['cache']) 64 { 65 pake_echo_action('project-export', 'Delete cache folder content'); 66 $sf_cache_dir = $sf_export_path . '/cache'; 67 pake_remove($finder, $sf_cache_dir); 68 } 41 69 42 70 // Delete all files into the uploads dir 43 pake_echo_action('project-export', 'Delete uploads folder content'); 44 $sf_upload_dir = $sf_export_path . '/web/uploads'; 45 pake_remove($finder, $sf_upload_dir); 71 if(!$options['uploads']) 72 { 73 pake_echo_action('project-export', 'Delete uploads folder content'); 74 $sf_upload_dir = $sf_export_path . '/web/uploads'; 75 pake_remove($finder, $sf_upload_dir); 76 } 46 77 47 78 // Delete all files and fixtures dir 48 $sf_fixtures_dir = $sf_export_path . '/data/fixtures'; 49 if(is_dir($sf_fixtures_dir)) 79 if(!$options['fixtures']) 50 80 { 51 pake_echo_action('project-export', 'Delete fixtures folder'); 52 pake_remove($finder, $sf_fixtures_dir); 53 pake_remove($sf_fixtures_dir, ''); 81 $sf_fixtures_dir = $sf_export_path . '/data/fixtures'; 82 if(is_dir($sf_fixtures_dir)) 83 { 84 pake_echo_action('project-export', 'Delete fixtures folder'); 85 pake_remove($finder, $sf_fixtures_dir); 86 pake_remove($sf_fixtures_dir, ''); 87 } 54 88 } 55 89 56 90 // Delete doc dir 57 pake_echo_action('project-export', 'Delete doc folder'); 58 $sf_doc_dir = $sf_export_path . '/doc'; 59 pake_remove($finder, $sf_doc_dir); 60 pake_remove($sf_doc_dir, ''); 91 if(!$options['doc']) 92 { 93 pake_echo_action('project-export', 'Delete doc folder'); 94 $sf_doc_dir = $sf_export_path . '/doc'; 95 pake_remove($finder, $sf_doc_dir); 96 pake_remove($sf_doc_dir, ''); 97 } 61 98 62 99 // Delete test dir 63 pake_echo_action('project-export', 'Delete test folder'); 64 $sf_test_dir = $sf_export_path . '/test'; 65 pake_remove($finder, $sf_test_dir); 66 pake_remove($sf_test_dir, ''); 100 if(!$options['test']) 101 { 102 pake_echo_action('project-export', 'Delete test folder'); 103 $sf_test_dir = $sf_export_path . '/test'; 104 pake_remove($finder, $sf_test_dir); 105 pake_remove($sf_test_dir, ''); 106 } 67 107 68 108 // Delete file symfony and symfony.php 69 if( file_exists($sf_export_path . '/symfony'))109 if(!$options['command']) 70 110 { 71 pake_echo_action('project-export', 'Delete symfony file'); 72 pake_remove($sf_export_path . '/symfony', ''); 73 } 111 if(file_exists($sf_export_path . '/symfony')) 112 { 113 pake_echo_action('project-export', 'Delete symfony file'); 114 pake_remove($sf_export_path . '/symfony', ''); 115 } 74 116 75 if(file_exists($sf_export_path . '/symfony.php')) 76 { 77 pake_echo_action('project-export', 'Delete symfony.php file'); 78 pake_remove($sf_export_path . '/symfony.php', ''); 117 if(file_exists($sf_export_path . '/symfony.php')) 118 { 119 pake_echo_action('project-export', 'Delete symfony.php file'); 120 pake_remove($sf_export_path . '/symfony.php', ''); 121 } 79 122 } 80 123 plugins/sfProjectExportPlugin/package.xml
r4976 r4984 11 11 <active>yes</active> 12 12 </lead> 13 <date>2007-09-0 4</date>13 <date>2007-09-05</date> 14 14 <version> 15 <release>1.1. 2</release>15 <release>1.1.3</release> 16 16 <api>1.1.0</api> 17 17 </version> … … 24 24 <contents> 25 25 <dir name="/"> 26 <file md5sum="37691c56a895428c82a5742449d393d0"name="data/tasks/sfPakeExport.php" role="data" />27 <file md5sum="70f493125c885ddbb1c7b8f5c7b61c5f"name="README" role="data" />28 <file md5sum="28b534f18b615a9ca0553e80b4da4b61"name="LICENSE" role="data" />26 <file name="data/tasks/sfPakeExport.php" role="data" /> 27 <file name="README" role="data" /> 28 <file name="LICENSE" role="data" /> 29 29 </dir> 30 30 </contents> … … 40 40 <name>symfony</name> 41 41 <channel>pear.symfony-project.com</channel> 42 <min> 0.8.1</min>42 <min>1.0.0</min> 43 43 <max>1.1.0</max> 44 44 <exclude>1.1.0</exclude> … … 47 47 </dependencies> 48 48 49 <phprelease> 50 </phprelease> 51 52 <changelog> 53 </changelog> 49 <phprelease /> 50 <changelog /> 54 51 </package>