Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
b842fc043f | |||
dac1b6ecf9
|
|||
4a198320ce
|
|||
7c429da0f3
|
|||
18aa3c60b6 | |||
71c2916284 |
11
CHANGELOG.md
11
CHANGELOG.md
@ -4,7 +4,16 @@ All notable changes to this project will be documented in this file.
|
|||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
## [unreleased](https://git.d3data.de/D3Public/OXID-Deployer/compare/1.0.0.0...rel_1.x)
|
## [unreleased](https://git.d3data.de/D3Public/OXID-Deployer/compare/1.0.1.0...rel_1.x)
|
||||||
|
|
||||||
|
## [1.0.1.0](https://git.d3data.de/D3Public/OXID-Deployer/compare/1.0.0.1...1.0.1.0) - 2024-11-19
|
||||||
|
### Added
|
||||||
|
- generic Composer task `dep composer [stage] --cmd="show oxid-esales/*"
|
||||||
|
|
||||||
|
## [1.0.0.1](https://git.d3data.de/D3Public/OXID-Deployer/compare/1.0.0.0...1.0.0.1) - 2024-11-04
|
||||||
|
### Changed
|
||||||
|
- handle config file from checkout to preven false isLaunched status
|
||||||
|
- move base inventory configuration to OXID recipe
|
||||||
|
|
||||||
## [1.0.0.0](https://git.d3data.de/D3Public/OXID-Deployer/releases/tag/1.0.0.0) - 2024-11-03
|
## [1.0.0.0](https://git.d3data.de/D3Public/OXID-Deployer/releases/tag/1.0.0.0) - 2024-11-03
|
||||||
### Added
|
### Added
|
||||||
|
@ -10,6 +10,9 @@ See [Deployer OXID recipe project](https://packagist.org/packages/d3/oxid-deploy
|
|||||||
|
|
||||||
## available tasks
|
## available tasks
|
||||||
|
|
||||||
|
### generic
|
||||||
|
- dep `composer` [stage] [--cmd="show d3/*"] - execute generic Composer commands
|
||||||
|
|
||||||
### OXID
|
### OXID
|
||||||
- dep `oxid:getVersion` [stage] - show version of current OXID installation
|
- dep `oxid:getVersion` [stage] - show version of current OXID installation
|
||||||
- dep `oxid:cloneDatabase` [stage] - dump contents from source to destination database
|
- dep `oxid:cloneDatabase` [stage] - dump contents from source to destination database
|
||||||
|
14
recipe/composerTasks.php
Normal file
14
recipe/composerTasks.php
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Deployer;
|
||||||
|
|
||||||
|
use \Symfony\Component\Console\Input\InputOption;
|
||||||
|
|
||||||
|
option('cmd', null, InputOption::VALUE_REQUIRED, 'full Composer command');
|
||||||
|
|
||||||
|
desc('run generic composer commands');
|
||||||
|
task('composer', function () {
|
||||||
|
$command = input()->getOption('cmd');
|
||||||
|
cd('{{release_or_current_path}}');
|
||||||
|
writeln(run('printf "\n" && {{bin/composer}} '.$command));
|
||||||
|
});
|
@ -2,7 +2,24 @@
|
|||||||
|
|
||||||
namespace Deployer;
|
namespace Deployer;
|
||||||
|
|
||||||
|
task('deploy:d3OxidBeforeVendorsTasks', [
|
||||||
|
'deploy:oxid_backup_configfile'
|
||||||
|
])->hidden();
|
||||||
|
|
||||||
|
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');
|
||||||
|
}
|
||||||
|
})->hidden();
|
||||||
|
|
||||||
desc('Oxid related tasks');
|
desc('Oxid related tasks');
|
||||||
task('deploy:d3OxidTasks', [
|
task('deploy:d3OxidAfterVendorTasks', [
|
||||||
|
'deploy:oxid_restore_configfile',
|
||||||
'deploy:clear_paths'
|
'deploy:clear_paths'
|
||||||
]);
|
])->hidden();
|
||||||
|
|
||||||
|
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');
|
||||||
|
}
|
||||||
|
})->hidden();
|
||||||
|
@ -3,4 +3,5 @@
|
|||||||
namespace Deployer;
|
namespace Deployer;
|
||||||
|
|
||||||
after('deploy:failed', 'deploy:unlock');
|
after('deploy:failed', 'deploy:unlock');
|
||||||
after('deploy:vendors', 'deploy:d3OxidTasks');
|
before('deploy:vendors', 'deploy:d3OxidBeforeVendorsTasks');
|
||||||
|
after('deploy:vendors', 'deploy:d3OxidAfterVendorTasks');
|
||||||
|
@ -4,8 +4,10 @@ namespace Deployer;
|
|||||||
|
|
||||||
require_once __DIR__.'/../../../deployer/deployer/recipe/composer.php';
|
require_once __DIR__.'/../../../deployer/deployer/recipe/composer.php';
|
||||||
|
|
||||||
|
require_once __DIR__.'/setup.php';
|
||||||
require_once __DIR__.'/menu.php';
|
require_once __DIR__.'/menu.php';
|
||||||
require_once __DIR__.'/hooks.php';
|
require_once __DIR__.'/hooks.php';
|
||||||
|
require_once __DIR__.'/composerTasks.php';
|
||||||
require_once __DIR__.'/databaseTasks.php';
|
require_once __DIR__.'/databaseTasks.php';
|
||||||
require_once __DIR__.'/deployTasks.php';
|
require_once __DIR__.'/deployTasks.php';
|
||||||
require_once __DIR__.'/setupTasks.php';
|
require_once __DIR__.'/setupTasks.php';
|
||||||
|
19
recipe/setup.php
Normal file
19
recipe/setup.php
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Deployer;
|
||||||
|
|
||||||
|
set('default_timeout', 3000);
|
||||||
|
|
||||||
|
set('shared_dirs', [
|
||||||
|
'source/sitemaps',
|
||||||
|
'source/export',
|
||||||
|
'source/log',
|
||||||
|
'source/import',
|
||||||
|
'source/out/downloads',
|
||||||
|
'source/out/media',
|
||||||
|
'source/out/pictures'
|
||||||
|
]);
|
||||||
|
|
||||||
|
set('copy_dirs', [
|
||||||
|
'var'
|
||||||
|
]);
|
@ -4,7 +4,7 @@ namespace Deployer;
|
|||||||
|
|
||||||
require_once 'inc/database.php';
|
require_once 'inc/database.php';
|
||||||
|
|
||||||
desc('create database coniguration file');
|
desc('create database configuration file');
|
||||||
task('setup:createDbConfig', function () {
|
task('setup:createDbConfig', function () {
|
||||||
try {
|
try {
|
||||||
if (!has('db_conf_path') || !strlen(get('db_conf_path'))) {
|
if (!has('db_conf_path') || !strlen(get('db_conf_path'))) {
|
||||||
@ -20,12 +20,7 @@ task('setup:createDbConfig', function () {
|
|||||||
run("touch {{db_conf_path}}");
|
run("touch {{db_conf_path}}");
|
||||||
}
|
}
|
||||||
if (test("[ -f {{db_conf_path}} ]")) {
|
if (test("[ -f {{db_conf_path}} ]")) {
|
||||||
$db_host = ask('database host', 'localhost');
|
run('printf "[client]\nhost=\"'.ask('database host', 'localhost').'\"\nport=\"'.ask('database port', '3306').'\"\nuser=\"'.ask('database user').'\"\npassword=\"'.askHiddenResponse('database password').'\"\n\n[mysql]\ndatabase=\"'.ask('database name').'\"" > {{db_conf_path}}');
|
||||||
$db_port = ask('database port', '3306');
|
|
||||||
$db_name = ask('database name');
|
|
||||||
$db_user = ask('database user');
|
|
||||||
$db_pass = askHiddenResponse('database password');
|
|
||||||
run('printf "[client]\nuser='.$db_user.'\npassword=\"'.$db_pass.'\"\nhost='.$db_host.'\nport='.$db_port.'\n\n[mysql]\ndatabase=\"'.$db_name.'\"" > {{db_conf_path}}');
|
|
||||||
info('config successful created');
|
info('config successful created');
|
||||||
} else {
|
} else {
|
||||||
throw new \RuntimeException('can not create {{db_conf_path}}, task stopped');
|
throw new \RuntimeException('can not create {{db_conf_path}}, task stopped');
|
||||||
|
Reference in New Issue
Block a user