c33s-toolkit / robo-file
4.2.4
2022-01-12 09:15 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.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
安装
.robo 供应商的安装
快速安装
获取快速开始的 默认 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(如有需要临时加载)安装 c33s/robofile
到 .robo/vendor 并自动加载。
项目 .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
。如果出现某种问题,只需切换到 .robo
目录并运行 composer update
。