Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
75 lines (60 sloc) 2.86 KB
<?xml version="1.0" encoding="UTF-8"?>
<!--
Generic build plugin
${plugin} should be mod_something...
-->
<project name="plugin" default="buildPlugin">
<target name="buildPluginZip" depends="buildPlugin">
<echo message="${destination.dir}/plugins/${pluginType}/${pluginName}/-${build.version}" />
<zip destfile="${destination.dir}/${pluginName}-${build.version}.zip"
basedir="${destination.dir}/plugins/${pluginType}/${pluginName}/"/>
</target>
<target name="buildPlugin">
<explode propertyName="pluginType" string="${plugin}" delimiter="_" key="1" />
<explode propertyName="pluginName" string="${plugin}" delimiter="_" key="2" />
<!--do we have a media folder?-->
<available file="${dirs.source}\media\${plugin}"
type="dir" property="mod.media.exist" value="yes"/>
<available file="${dirs.source}\administrator\language\"
type="dir" property="adminLang.exist" value="yes"/>
<if>
<equals arg1="${adminLang.exist}" arg2="1"/>
<then>
<copy todir="${destination.dir}/plugins/${pluginType}/${pluginName}/administrator/language/">
<fileset dir="${dirs.source}/administrator/language/">
<include name="**/*.${plugin}.**"/>
</fileset>
</copy>
</then>
</if>
<copy todir="${destination.dir}/plugins/${pluginType}/${pluginName}">
<fileset dir="${dirs.source}/plugins/${pluginType}/${pluginName}" includes="**/*.*"/>
</copy>
<if>
<equals arg1="${mod.media.exist}" arg2="1"/>
<then>
<copy todir="${destination.dir}/modules/${pluginType}/${pluginName}/media/${plugin}">
<fileset dir="${dirs.source}/media/${plugin}">
<include name="**/*.*"/>
<exclude name="kml/*.*"/>
</fileset>
</copy>
</then>
</if>
<copy file="${dirs.source}/plugins/${pluginType}/${pluginName}/${pluginName}.xml"
tofile="${destination.dir}/plugins/${pluginType}/${pluginName}/${pluginName}.xml" overwrite="true">
<filterchain>
<replacetokens begintoken="@@" endtoken="@@">
<token key="DATE" value="${build.date}"/>
<token key="VERSION" value="${build.version}"/>
<token key="PLUGINNAME" value="${plugin}"/>
</replacetokens>
</filterchain>
</copy>
<extfile file="${destination.dir}/plugins/${pluginType}/${pluginName}/${pluginName}.xml"
sourceDir="${dirs.source}/plugins/${pluginType}/${pluginName}"
component="${plugin}"
type="plugin"
/>
</target>
</project>