thereference / robo-lando
Robo Task Runner 的 Lando 扩展
1.0.0
2017-10-12 18:59 UTC
Requires
- php: >=5.5.0
- consolidation/robo: ~1
Requires (Dev)
- phpunit/phpunit: ~4.4
This package is not auto-updated.
Last update: 2024-09-15 03:39:36 UTC
README
扩展,用于在Robo中执行 Lando 命令。
在堆栈中运行 Lando 命令。您可以定义所有命令的全局选项(如 Lando init)。
默认情况下,选项 -y 被假定,但可以在调用 exec() 时通过传递第二个参数 false 来覆盖。
目录
安装
版本
~1.0: Robo >= 1.0.0-RC1
将 "thereference/robo-lando": "~1" 添加到您的 composer.json
{
"require-dev": {
"thereference/robo-lando": "~1"
}
}
执行 composer update。
测试
composer test
用法
在您的 RoboFile 中使用(根据您使用的版本)特性
class RoboFile extends \Robo\Tasks { // ~1 for Robo >=1.0.0-RC1 use \TheReference\Robo\Task\Lando\loadTasks; //... }
示例
显示配置
$this->taskLandoConfig() ->run();
销毁应用程序的基础设施
$this->taskLandoDestroy() ->application("myapp") ->run();
获取有关 Lando 应用程序的信息
$this->taskLandoInfo() ->application("myapp") ->deep() ->run();
初始化新的 Lando 应用程序
$this->taskLandoInit() ->recipe("drupal8") ->webroot("./") ->run();
列出正在运行的 Lando 应用程序
$this->taskLandoList() ->run();
打印应用程序的 Lando 日志
$this->taskLandoLogs() ->recipe("drupal8") ->webroot("./") ->run();
关闭所有正在运行的 Lando 容器
$this->taskLandoPoweroff() ->run();
重建 Lando 容器和工具
$this->taskLandoRebuild() ->services(array("database", "appserver") ->run();
停止和重启 Lando 应用程序
$this->taskLandoRestart() ->application("myapp") ->run();
公开暴露 Lando URL
$this->taskLandoShare() ->url("https://:32785") ->run();
通过 ssh 进入 Lando 应用程序的具体服务并执行命令
$this->taskLandoSsh() ->user("johndoe") ->command("ls -l /") ->run();
启动 Lando 应用程序
$this->taskLandoStart() ->application("myapp") ->run();
停止 Lando 应用程序
$this->taskLandoStop() ->application("myapp") ->run();
打印 Lando 的版本
$this->taskLandoVersion() ->run();