rename shop group to oxid

Cette révision appartient à :
Daniel Seifert 2024-11-02 14:26:44 +01:00
Parent e1de358e91
révision 64de601728
Signé par: DanielS
ID de la clé GPG: 6A513E13AEE66170
2 fichiers modifiés avec 17 ajouts et 17 suppressions

Voir le fichier

@ -10,8 +10,8 @@ See Deployer OXID recipe project for further instructions.
## available tasks
- dep `shop:getVersion` [stage] - show version of current OXID installation
- dep `shop:backupDatabase` [stage] - rotate old database backups and create a new one
- dep `shop:cloneDatabase` [stage] - dump contents from source to destination database
- dep `shop:runMigration` [stage] - run all database migrations
- dep `oxid:getVersion` [stage] - show version of current OXID installation
- dep `oxid:backupDatabase` [stage] - rotate old database backups and create a new one
- dep `oxid:cloneDatabase` [stage] - dump contents from source to destination database
- dep `oxid:runMigration` [stage] - run all database migrations
- dep `setup:createDbConfig` [stage] - generate database configuration file

Voir le fichier

@ -3,17 +3,17 @@
namespace Deployer;
desc('run all database migrations');
task('shop:runMigration', [
'shop:setShopsOffline',
'shop:executeMigrations',
'shop:setShopsOnline'
task('oxid:runMigration', [
'oxid:setShopsOffline',
'oxid:executeMigrations',
'oxid:setShopsOnline'
]);
require_once 'inc/database.php';
desc('set shops offline');
task('shop:setShopsOffline', function() {
task('oxid:setShopsOffline', function() {
if (get('mysql_configured')) {
$query = "UPDATE oxshops SET oxactive = '0', OXREGISTERSUBJECT = CONCAT('..', OXREGISTERSUBJECT) WHERE oxactive = '1';";
run('{{bin/mysql}} --defaults-extra-file={{db_conf_path}} -e "'.$query.'"');
@ -22,21 +22,21 @@ task('shop:setShopsOffline', function() {
}
});
task('shop:runMigration:failed', function() {
invoke('shop:setShopsOnline');
task('oxid:runMigration:failed', function() {
invoke('oxid:setShopsOnline');
})->hidden();
fail('shop:runMigration', 'shop:runMigration:failed');
fail('oxid:runMigration', 'oxid:runMigration:failed');
desc('execute OXID Doctrine migrations');
task('shop:executeMigrations', function () {
task('oxid:executeMigrations', function () {
if (test("[ -f {{current_path}}/vendor/bin/oe-eshop-doctrine_migration ]")) {
run('{{bin/php}} {{current_path}}/vendor/bin/oe-eshop-doctrine_migration migrations:migrate');
}
})->hidden();;
desc('set shops online');
task('shop:setShopsOnline', function() {
task('oxid:setShopsOnline', function() {
if (get('mysql_configured')) {
$query = "UPDATE oxshops SET oxactive = '1', OXREGISTERSUBJECT = SUBSTR(OXREGISTERSUBJECT, 3) WHERE oxactive = '0' AND OXREGISTERSUBJECT LIKE '..%';";
run('{{bin/mysql}} --defaults-extra-file={{db_conf_path}} -e "'.$query.'"');
@ -46,7 +46,7 @@ task('shop:setShopsOnline', function() {
});
desc('show version of current OXID installation');
task('shop:getVersion', function () {
task('oxid:getVersion', function () {
if (test("[ -f {{current_path}}/composer.lock ]")) {
cd('{{current_path}}');
info(
@ -58,7 +58,7 @@ task('shop:getVersion', function () {
});
desc('dump contents from source to destination database');
task('shop:cloneDatabase', function () {
task('oxid:cloneDatabase', function () {
if (get('mysql_configured') && get('mysqldump_configured')) {
info('Note: Use a dedicated read only user for accessing the source database.');
info('Using the following source database:');
@ -84,7 +84,7 @@ task('shop:cloneDatabase', function () {
});
desc('rotate old database backups and create a new one');
task('shop:backupDatabase', function () {
task('oxid:backupDatabase', function () {
if (get('mysql_configured') && get('mysqldump_configured')) {
if (!test("[ -f {{deploy_path}}/database/rotatemap.conf ]")) {
run('printf "{{deploy_path}}/database/backup/backup.sql {\n rotate 5\n}" > {{deploy_path}}/database/rotatemap.conf');