部署生产环境时的完整 Symfony rsync 命令
使用...部署项目时,Symfony 运行的完整 rsync 命令是什么
php symfony project:deploy production --go
?
What is the full rsync command run by Symfony when deploying a project with...
php symfony project:deploy production --go
?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是通过 sfProjectDepoyTask 完成的,查看源代码在这里。你可以浏览一下源码,非常简单。
完整的命令如下。将
<
>
之间的值替换为您配置中的值。根据您的配置,不包含命令的某些部分。
您还可以在此处查看快速rsync 教程。
This is done via the sfProjectDepoyTask, see source here. You can browse the source, it's pretty straight forward.
The full command is below. Substitute values between
<
>
's with values from you're config.Some parts of the command are not included depending on your config.
You can also see a quick rsync tutorial here.
我从未使用过它,但查看
sfProjectDeployTask.class.php
,您将看到rsync
命令已在 162< /a>.一个快速但肮脏的解决方案可能是添加
$command
变量的echo
。否则,查看
sfFilesystem.class.php
,您将看到execute()
方法首先调用此命令:所以,我想有一种方法可以使该命令记录在某处...
I've never used it, but looking at the source-code of
sfProjectDeployTask.class.php
, you'll see thersync
command is prepared on line 162.A quick'n dirty solution might be to add an
echo
of the$command
variable.Else, looking at the source-code of
sfFilesystem.class.php
, you'll see theexecute()
method first calls this :So, I suppose there is a way for the command to be loggued somewhere...