c33s / robofile
与robo.li一起使用的各种插件特性
4.2.5
2022-12-10 14:56 UTC
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.5
- 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-bugfix/87-robo-task-using-sf-env-fails-during-first-run-because-vendor-is-not-yet-loaded
- dev-feature/76-add
- dev-feature/64--robo-enable-ci
- dev-feature/64--robo-update
- dev-feature/31-deploy-config-dto
This package is auto-updated.
Last update: 2024-08-28 13:01:32 UTC
README
安装
安装.robo供应商
快速
获取快速入门的默认RoboFile:Default RoboFile
手动
或者 在您的 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.cn/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';
这将使用composer(如果需要临时加载)在.robo/vendor中安装 c33s/robofile
并自动加载它。
项目 .gitignore
ci要求您将以下文件夹添加到项目的 .gitignore
文件中。
快速
只需运行 robo ci:gitignore
手动
或者手动将以下目录添加到您的gitignore中
/.robo/bin
/.robo/cache
/.robo/vendor
使用
您可以通过包含主特性来使用所有可用任务
class RoboFile extends \Robo\Tasks
{
use \C33s\Robo\C33sTasks;
或者您可以手动选择它们以防止与您自己的任务冲突。请查看 C33s\Robo\C33sTasks.php
了解单个模块。请注意,其中一些任务依赖于其他任务。
Robo钩子调试
一个辅助特性,可以列出在您的robo命令期间触发的所有钩子的顺序和参数。只需将特性添加到您的 RoboFile.php
class RoboFile extends \Robo\Tasks
{
use \C33s\Robo\DebugHooksTrait;
CI模块、版本和哈希值
可用的CI模块可在 https://robo.c33s.services/ 找到。项目源代码位于 https://gitlab.com/vworldat/ci-provider。
更新依赖项
通过执行 robo ci:self-update
可以更新 c33s-toolkit/robo-file
。如果 somehow 出了问题,只需切换到 .robo
目录并运行 composer update
。