i’m creating a PHP project and i’d wish to distribuite 2 version: a free one and a pro one.
Enhanced features are all inside some files, so i only have to “skip” them to create the free version.
My question is: which is the best way to achieve that?
i can list every file in the build.xml file (they are 20 at max), but it’s pretty ugly, moreover if i forgot to update the list i will ad these files…
i thought about using the contains keyword, but it will slow my build?
EDIT
This is my build.xml file:
<project name="MyProject" default="build" basedir=".">
<property name="buildDir" value="${basedir}/build"/>
<property name="componente" value="${basedir}/trunk/componente"/>
<property name="backend" value="${componente}/backend"/>
<property name="frontend" value="${componente}/frontend"/>
<target name="build" depends="cleanup, pro, free" />
<!-- Clean up the build directory output -->
<target name="cleanup">
<echo>Clean up build directory</echo>
<delete includeemptydirs="true">
<fileset dir="${buildDir}" includes="**/*"/>
</delete>
</target>
<!-- Create the pro package (no file exclusion) -->
<target name="pro">
<echo>Build pro version</echo>
<zip destfile="${buildDir}/pro.zip" basedir="${componente}" />
</target>
<!-- Create the free package (file exclusion) -->
<target name="free">
<echo>Build free version</echo>
</target>
EDIT 2
My pro files are in different folders and i can’t move them since i’m using the MVC pattern
ok, i found it.
i added a PHPDoc tag into my exclude files:
@category ProPackagethen i added these rules in my build.xml
And it’s done!