Last active
October 3, 2015 08:58
-
-
Save wowo/2430561 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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