jihel/deployment-bundle

symfony2 的部署插件

dev-master 2018-02-20 14:20 UTC

This package is not auto-updated.

Last update: 2024-09-28 16:36:17 UTC


README

一个简单的包,可以同时运行多个命令以进行部署

1- 安装

将插件添加到您的 composer.json 中的 require 部分

{
    "require": {
        "jihel/deployment-bundle": "dev-master",
    }
}

或者

php composer.phar require jihel/deployment-bundle

将包添加到 AppKernel.php

public function registerBundles()
{
    $bundles = array(
        ...
        new Jihel\Plugin\DeploymentBundle\JihelPluginDeploymentBundle(),
    );
}

2- 配置您的 config.yml

将命令添加到您的 config.yml 中,并按您希望执行的顺序排列

jihel_plugin_deployment:
    commands:
        - "php app/console cache:clear --env=prod"
        - "php app/console assets:install web/"
        - "php app/console assetic:dump --force --env=prod"
        - "php app/console fos:js-routing:dump"

3- 使用

只需运行命令

php app/console jihel:plugin:deploy

4- 感谢

感谢我花时间编写课程,让懒惰的开发者受益。您可以通过这里访问我的简历。