diff --git a/recipe/deployTasks.php b/recipe/deployTasks.php index 3278c92..d98af21 100644 --- a/recipe/deployTasks.php +++ b/recipe/deployTasks.php @@ -2,7 +2,24 @@ namespace Deployer; +task('deploy:d3OxidBeforeVendorsTasks', [ + 'deploy:oxid_backup_configfile' +]); + +task('deploy:oxid_backup_configfile', function() { + if (test('[ -f {{release_path}}/source/config.inc.php ]')) { + run('mv {{release_path}}/source/config.inc.php {{release_path}}/source/config.deployment.inc.php'); + } +}); + desc('Oxid related tasks'); -task('deploy:d3OxidTasks', [ +task('deploy:d3OxidAfterVendorTasks', [ + 'deploy:oxid_restore_configfile', 'deploy:clear_paths' ]); + +task('deploy:oxid_restore_configfile', function() { + if (test('[ -f {{release_path}}/source/config.deployment.inc.php ]')) { + run('mv {{release_path}}/source/config.deployment.inc.php {{release_path}}/source/config.inc.php'); + } +}); diff --git a/recipe/hooks.php b/recipe/hooks.php index 467b9c4..42c77b7 100644 --- a/recipe/hooks.php +++ b/recipe/hooks.php @@ -3,4 +3,5 @@ namespace Deployer; after('deploy:failed', 'deploy:unlock'); -after('deploy:vendors', 'deploy:d3OxidTasks'); +before('deploy:vendors', 'deploy:d3OxidBeforeVendorsTasks'); +after('deploy:vendors', 'deploy:d3OxidAfterVendorTasks');