handle config file from checkout to prevent false isLaunched status

This commit is contained in:
Daniel Seifert 2024-11-04 15:03:09 +01:00
parent 376798ffb7
commit 71c2916284
2 changed files with 20 additions and 2 deletions

View File

@ -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');
}
});

View File

@ -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');