symfony: ~

tasks:
    _symfony.build.copy_local_vendor: |
        if [ -d "$(cwd)/vendor/" ];
            then rsync -rp $(cwd)/vendor/ $(build.dir)/vendor;
        fi;

    _symfony.build.composer_install: |
        cd $(build.dir) && composer install --no-scripts;

    _symfony.build.assets_install: |
        cd $(build.dir) && php $(symfony.console) assets:install $(symfony.web) --env=$(env) --no-debug;

    _symfony.build.assetic_dump: |
        cd $(build.dir) && php $(symfony.console) assetic:dump --env=$(env) --no-debug;

    build:
        post:
            - @_symfony.build.copy_local_vendor
            - @_symfony.build.composer_install
            - ?(symfony.assets)  @_symfony.build.assets_install
            - ?(symfony.assetic) @_symfony.build.assetic_dump

    deploy:
        post:
            - ?(symfony.flush_cache) ssh $(env.ssh) "cd $(env.root) && php $(symfony.console) cache:clear --env=$(env) --no-debug"

symfony: ~

tasks:
    _symfony.build.copy_local_vendor: |
        if [ -d "$(cwd)/vendor/" ];
            then rsync -rp $(cwd)/vendor/ $(build.dir)/vendor;
        fi;

    _symfony.build.composer_install: |
        cd $(build.dir) && composer install --no-scripts;

    _symfony.build.assets_install: |
        cd $(build.dir) && php $(symfony.console) assets:install $(symfony.web) --env=$(env) --no-debug;

    _symfony.build.assetic_dump: |
        cd $(build.dir) && php $(symfony.console) assetic:dump --env=$(env) --no-debug;

    _symfony.env.flush_cache: |
        ssh $(env.ssh) "cd $(env.root) && php $(symfony.console) cache:clear --env=$(env) --no-debug"

    build:
        post:
            - @_symfony.build.copy_local_vendor
            - @_symfony.build.composer_install
            - ?(symfony.assets)  @_symfony.build.assets_install
            - ?(symfony.assetic) @_symfony.build.assetic_dump

    deploy:
        post: [?(symfony.flush_cache) @_symfony.env.flush_cache]

Move the cache flush to a separate task so it can be reused in other tasks.
Move the cache flush to a separate task so it can be reused in other tasks.

git-svn-id: 94be96673c32c7e137ceb6fcca7542b5c2bc7216@24028 0f35748b-8228-47f0-bbea-889afbbd9a42
