Skip to content

Instantly share code, notes, and snippets.

@joshavg
Created April 17, 2015 13:53
Show Gist options
  • Save joshavg/5b49c4ef5e052938bc8d to your computer and use it in GitHub Desktop.
Save joshavg/5b49c4ef5e052938bc8d to your computer and use it in GitHub Desktop.
symfony2 phing
<?xml version="1.0" encoding="UTF-8"?>
<project name="FIXME-Project-Name" default="">
<target name="rights">
<chown file="" user="www-data">
<fileset dir="app">
<include name="cache/**" />
<include name="logs/**" />
</fileset>
</chown>
<chmod file="" mode="0775">
<fileset dir="app">
<include name="cache/**" />
<include name="logs/**" />
</fileset>
</chmod>
</target>
<target name="install">
<composer command="update" composer="/usr/local/bin/composer">
<arg line="--optimize-autoloader" />
</composer>
<phingcall target="postupdate" />
<echo msg="open config.php from your webbrowser for further checks" />
</target>
<target name="postupdate">
<SymfonyConsole command="cache:clear">
<arg name="env" value="prod" />
</SymfonyConsole>
<SymfonyConsole command="cache:warmup">
<arg name="env" value="prod" />
</SymfonyConsole>
<SymfonyConsole command="assets:install">
<arg name="env" value="prod" />
</SymfonyConsole>
<SymfonyConsole command="assetic:dump">
<arg name="env" value="prod" />
</SymfonyConsole>
<phingcall target="rights" />
</target>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment