<?xml version="1.0" encoding="UTF-8"?>
<project name="JCE Fullpage Plugin" basedir="." default="build">
	<property description="Package Version" name="package_version" value="150" />
	<property description="Version" name="version" value="1.5.0" />
	<property description="Plugin Name" name="plugin_name" value="fullpage" />
	<property description="Language directory" name="lang_dir" value="../../../../../../language/en-GB" />
	<property description="Export directory" name="export_dir" value="/Users/ryandemmer/Releases/plugins/" />
	<property description="E-mail" name="e-mail" value="info@joomlacontenteditor.net" />
	<property description="Licence" name="licence" value="GNU/GPL Version 2 - http://www.gnu.org/licenses/gpl-2.0.html" />
	<property description="Copyright" name="copyright" value="Copyright (C) 2006 - 2010 Ryan Demmer. All rights reserved" />
	
	<tstamp>
        <format property="DATE" pattern="%d %B %Y" />
    </tstamp>
	
	<target name="build" description="Builds the project">
		<delete dir="${export_dir}/${plugin_name}/${package_version}" quiet="true" />
		<delete file="${export_dir}/jce_${plugin_name}_${package_version}.zip" quiet="true" />
		
		<copy todir="${export_dir}/${plugin_name}/${package_version}/">
	    	<fileset dir=".">
		        <include name="**" />
				<exclude name="build.xml" />
				<exclude name=".project" />
				<exclude name=".externalToolBuilders/" />
		    </fileset>
			<fileset dir="${lang_dir}">
	    		<include name="en-GB.com_jce_${plugin_name}.ini" />
			</fileset>		
	    </copy>
		
		<reflexive>
			<fileset dir="${export_dir}/${plugin_name}/${package_version}/">
		        <include name="${plugin_name}.xml" />
		    </fileset>
			<filterchain>
				<replacetokens begintoken="@@" endtoken="@@">
					<token key="version" value="${version}" />
					<token key="email" value="${e-mail}" />
					<token key="date" value="${DATE}" />
					<token key="licence" value="${licence}" />
					<token key="copyright" value="${copyright}" />
				</replacetokens>
			</filterchain>
		</reflexive>
		
		<zip destfile="${export_dir}/jce_${plugin_name}_${package_version}.zip" basedir="${export_dir}/${plugin_name}/${package_version}/">
	    	<fileset dir="${export_dir}/${plugin_name}/${package_version}/">
		        <include name="**" />
		    </fileset>
	    </zip>
		
	</target>
</project>