English 中文(简体)
如何向拉拉维尔特使任务提出论据或建议
原标题:How to pass arguments or params to Laravel Envoy task

我在拉拉维尔项目上工作,我们在那里为当地发展环境使用docker-compose,我们正在努力缩短我们用于安装堆肥料和手工艺品的指令。 这方面的一个例子是我们迄今所做工作:

@task( composer-require )
   docker-compose exec -u 1000 web composer require {{ $package }}
@endtask

And use as follow envoy run composer-install --package=xxx/yyy

我们现在的<代码>。 特使.blade.php文档正变得一面,因为我们必须把每一种使用都当作一项任务,我们必须记住所有这些名字。

我想知道,如果有可能的话,我们怎么能够像这个“条码”这样的指挥,那么,我们如何能够使用堆肥机安装xxx/yyy,并且只界定一个名为<条码>的操作器/代码>的任务,然后通过<条码>install xxx/yyyyy部分?

Sory about my english

问题回答

您可以通过如下论点:envoyî-command=require- Package=laracasts/flash>。 也可设定<代码>-包装和<代码>-command的违约情况。 如果是的话。 在可能的情况下,使用一个部署的“历史”而不是一个任务。

@servers([ web  =>  127.0.0.1 ])

@setup
    $package = isset($package) ? $package : "laravel/envoy";
    $command = isset($command) ? $command : "require";
@endsetup

@story( deploy )
    composer
@endstory

@task( composer )
    echo "Running: composer {{ $command }} {{ $package }}.";
    composer {{ $command }} {{ $package }}
@endtask

@finished
    echo "Envoy deployment complete.
";
@endfinished




相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签