extract migrate task
Cette révision appartient à :
Parent
27f664ac51
révision
eb855ef6c3
@ -39,8 +39,9 @@ This command set `current` directory to previous deployment:
|
||||
|
||||
## Available tasks
|
||||
|
||||
* dep `deploy` [stage] - create a new release for defined stage
|
||||
* dep `rollback` [stage] - switch to previous release
|
||||
- dep `deploy` [stage] - create a new release for defined stage
|
||||
- dep `rollback` [stage] - switch to previous release
|
||||
- dep `migrate`[stage] - run all database migrations
|
||||
|
||||
* dep `duplicateDatabase` [stage] - dump contents from source database (live) to destination database (stage) and replace live to stage URLs
|
||||
* dep `getVersion` [stage] - show version of current WordPress installation
|
||||
|
19
deploy.php
19
deploy.php
@ -16,13 +16,17 @@ after('deploy:vendors', 'deploy:d3OxidTasks');
|
||||
|
||||
desc('Oxid related tasks');
|
||||
task('deploy:d3OxidTasks', [
|
||||
'deploy:clear_paths',
|
||||
'deploy:setShopsOffline',
|
||||
'deploy:setShopsOnline'
|
||||
'deploy:clear_paths'
|
||||
]);
|
||||
|
||||
desc('run all database migrations');
|
||||
task('migrate', [
|
||||
'migrate:setShopsOffline',
|
||||
'migrate:setShopsOnline'
|
||||
]);
|
||||
|
||||
desc('set shops offline');
|
||||
task('deploy:setShopsOffline', function() {
|
||||
task('migrate:setShopsOffline', function() {
|
||||
if (has('bin/mysql') && strlen(get('bin/mysql')) &&
|
||||
has('db_name') && strlen(get('db_name')) &&
|
||||
has('db_conf_path') && strlen(get('db_conf_path')) && test("[ -f {{db_conf_path}} ]")
|
||||
@ -32,10 +36,10 @@ task('deploy:setShopsOffline', function() {
|
||||
} else {
|
||||
info('missing config, task skipped');
|
||||
}
|
||||
})->select('role=production,role=stage');
|
||||
});
|
||||
|
||||
desc('set shops online');
|
||||
task('deploy:setShopsOnline', function() {
|
||||
task('migrate:setShopsOnline', function() {
|
||||
if (has('bin/mysql') && strlen(get('bin/mysql')) &&
|
||||
has('db_name') && strlen(get('db_name')) &&
|
||||
has('db_conf_path') && strlen(get('db_conf_path')) && test("[ -f {{db_conf_path}} ]")
|
||||
@ -45,4 +49,5 @@ task('deploy:setShopsOnline', function() {
|
||||
} else {
|
||||
info('missing config, task skipped');
|
||||
}
|
||||
})->select('role=production,role=stage');
|
||||
});
|
||||
|
||||
|
Chargement…
Référencer dans un nouveau ticket
Block a user