<?xml version="1.0" encoding="UTF-8"?>
<project name="Orchard deployment project" default="main" basedir=".">
 
    <property file="./build/properties/default.properties" />
 
    <if>
        <isset property="build.env" />
        <then>
            <echo message="Overwriting default.properties with ${build.env}.properties" />
            <property file="./build/properties/${build.env}.properties" override="true" />
        </then>
    </if>
    <if>
        <isset property="lastChangeToApply" />
        <then>
            <echo message="Detected lastChangeToApply, we will attempt to migrate to version ${lastChangeToApply}" />
        </then>
    </if>
    <target name="main">
        <echo message="+------------------------------------------+"/>
        <echo message="|                                          |"/>
        <echo message="| Lets build some database changes         |"/>
        <echo message="|                                          |"/>
        <echo message="+------------------------------------------+"/>
 
        <phing phingfile="${project.basedir}/build/build-configuration.xml" target="configuration" />
        <phing phingfile="${project.basedir}/build/build-database.xml" target="database" />
    </target>
 
    <target name="database-init">
        <phing phingfile="${project.basedir}/build/build-database.xml" target="database-init" />
    </target>
 
</project>
