c33s-toolkit / robo-file
Various plugin traits to use with robo.li
Requires
- php: >=5.6
- czproject/git-php: ^3.14.0
- nikolaposa/version: ^2.2.2
- symfony/debug: ^3.3 || ^4.0 || ^5.0
- symfony/dotenv: ^3.3 || ^4.0 || ^5.0
- symfony/var-dumper: ^3.3 || ^4.0 || ^5.0
- webmozart/path-util: ^2.3.0
Requires (Dev)
- consolidation/robo: ^1.4.12
- symfony/process: ^3.4 || ^4.0 || ^5.0
- dev-main
- 4.2.4
- 4.2.3
- 4.2.2
- 4.2.1
- 4.2.0
- 4.1.1
- 4.1.0
- 4.0.0
- 3.0.2
- 3.0.1
- 3.0.0
- 2.2.0
- 2.1.2
- 2.1.1
- 2.1.0
- 2.0.6
- 2.0.5
- 2.0.4
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0
- 1.0.0
- 0.4.x-dev
- 0.4.1
- 0.4.0
- 0.3.6
- 0.3.5
- 0.3.4
- 0.3.3
- 0.3.2
- 0.3.1
- 0.3.0
- 0.2.1
- 0.2.0
- 0.1.3
- 0.1.2
- 0.1.1
- 0.1.0
- dev-feature/76-add
- dev-feature/64--robo-enable-ci
- dev-feature/64--robo-update
- dev-feature/31-deploy-config-dto
- dev-feature/47-exec-symfony
- dev-feature/49-output-ci-self-update-cmd
- dev-feature/34-deploy-to-example
- dev-feature/16-gitignore-task
- dev-feature/46-env-to-exec
- dev-feature/45-ci-update
- dev-feature/43-deployment-env-refactor
- dev-feature/42-var-dumper
- dev-bugfix/40-codecoverage
- dev-feature/39-add-gitlab-jobid-to-version
- dev-bugfix/33-missing-version-file
- dev-bugfix/38-correct-env-detection-for-prod
- dev-bugfix/32-fix-missing-version-offset
This package is auto-updated.
Last update: 2022-02-01 13:10:36 UTC
README
Installation
Installation of the .robo Vendor
Quick
Go get the Default RoboFile for a quick start,
Manual
or put the following code on top of your RoboFile.php
:
<?php
echo RoboFile::ROBO_DIR;
(is_dir(RoboFile::ROBO_DIR) || mkdir(RoboFile::ROBO_DIR)) && chdir(RoboFile::ROBO_DIR);
if (!is_file('composer.json')) {
exec('composer init --no-interaction', $output, $resultCode);
exec('composer require c33s/robofile --no-interaction', $output, $resultCode);
exec('rm composer.yaml || rm composer.yml || return true', $output, $resultCode2);
if ($resultCode > 0) {
copy('https://getcomposer.org/composer.phar', 'composer');
exec('php composer require c33s/robofile --no-interaction');
unlink('composer');
}
} else {
exec('composer install --dry-run --no-interaction 2>&1', $output);
if (false === in_array('Nothing to install or update', $output)) {
fwrite(STDERR, "\n##### Updating .robo dependencies #####\n\n")
&& exec('composer install --no-interaction');
}
}
chdir('..');
require RoboFile::ROBO_DIR.'/vendor/autoload.php';
This will install c33s/robofile
in .robo/vendor using composer (loaded temporarily if needed) and autoload it.
Projects .gitignore
ci requires that you add the following folders to your projects .gitignore
file.
Quick
simply run robo ci:gitignore
Manual
or add the folloing directories manually to your gitignore
/.robo/bin
/.robo/cache
/.robo/vendor
Usage
You can use all the available tasks by including the main trait:
class RoboFile extends \Robo\Tasks
{
use \C33s\Robo\C33sTasks;
Or you may select them by hand to prevent collisions with your own tasks. Take a look at
C33s\Robo\C33sTasks.php
to find out about the single modules. Please be aware that some of those tasks depend on others.
Robo hooks debugging
A helper trait to list the order and arguments of all hooks triggered during
your robo command is also available. Just add the trait to your RoboFile.php
:
class RoboFile extends \Robo\Tasks
{
use \C33s\Robo\DebugHooksTrait;
CI modules, versions and hashes
The available CI modules can be found at https://robo.c33s.services/. The project sources are located at https://gitlab.com/vworldat/ci-provider.
Update dependencies
c33s-toolkit/robo-file
can be updated by executing robo ci:self-update
. If this is somehow broken,
just change into the .robo
directory and run composer update
.