add generic Composer task

This commit is contained in:
Daniel Seifert 2024-11-19 15:56:50 +01:00
parent dac1b6ecf9
commit b842fc043f
4 changed files with 23 additions and 1 deletions

View File

@ -4,7 +4,11 @@ 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.1...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 ## [1.0.0.1](https://git.d3data.de/D3Public/OXID-Deployer/compare/1.0.0.0...1.0.0.1) - 2024-11-04
### Changed ### Changed

View File

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

View File

@ -7,6 +7,7 @@ require_once __DIR__.'/../../../deployer/deployer/recipe/composer.php';
require_once __DIR__.'/setup.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';