Skip to content

Instantly share code, notes, and snippets.

@wowo
Last active October 3, 2015 08:58
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wowo/2430561 to your computer and use it in GitHub Desktop.
Save wowo/2430561 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="UTF-8"?>
<project name="Symfony2 project" default="build">
<target name="build" depends="pull, vendors, cache, assetic, assets">
<echo message="Symfony2 project"/>
</target>
<macrodef name="git">
<attribute name="command" />
<attribute name="dir" default="" />
<element name="args" optional="true" />
<sequential>
<echo message="git @{command}" />
<exec executable="git" dir="@{dir}">
<arg value="@{command}" />
<args/>
</exec>
</sequential>
</macrodef>
<target name="pull" description="Pulling changes from GIT repo">
<git command="pull" />
</target>
<target name="vendors" description="Installing Symfony2 vendors">
<exec executable="${basedir}/bin/vendors">
<arg value="install" />
</exec>
</target>
<target name="cache" description="Cleanup cache">
<delete includeemptydirs="true">
<dirset dir="${basedir}/app/cache/">
<include name="*" />
</dirset>
</delete>
</target>
<target name="assetic" description="Dumping assets">
<exec executable="${basedir}/app/console">
<arg value="--env=prod" />
<arg value="assetic:dump" />
</exec>
</target>
<target name="assets" description="Installing assets">
<exec executable="${basedir}/app/console">
<arg value="assets:install" />
<arg value="--symlink" />
<arg value="${basedir}/web" />
</exec>
</target>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment