Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ACL Manager Build file
<?xml version="1.0" encoding="UTF-8"?>
<project name="aclmanager" default="dist" basedir="/Users/sanderpotjer/github/aclmanager/build/">
<condition property="project_dir" value="..">
<not>
<isset property="project_dir" />
</not>
</condition>
<condition property="package_dir" value="../packages">
<not>
<isset property="package_dir" />
</not>
</condition>
<condition property="tmp_dir" value="tmp">
<not>
<isset property="tmp_dir" />
</not>
</condition>
<property file="build.config.ini" />
<property name="aclmanager.directory" value="${project_dir}/" />
<property name="aclmanager.directory.list" value="" />
<target name="dist" depends="mkdir,copy,init,package,tar,zip,gzip,bz2,cleanup" />
<target name="mkdir">
<mkdir dir="${tmp_dir}" />
<mkdir dir="${package_dir}" />
</target>
<target name="copy" depends="mkdir">
<copy todir="${tmp_dir}/admin">
<fileset dir="${aclmanager.directory}/administrator/components/com_aclmanager">
<exclude name="install.aclmanager.php" />
<exclude name="aclmanager.xml" />
<exclude name="remove.aclmanager.php" />
<exclude name="script.aclmanager.php" />
<exclude name="CHANGELOG.txt" />
<exclude name="LICENSE.txt" />
<exclude name="language/" />
</fileset>
</copy>
<copy todir="${tmp_dir}/plugins/system/aclmanager">
<fileset dir="${aclmanager.directory}/plugins/system/aclmanager">
<exclude name=".git\**" />
<exclude name=".gitignore" />
</fileset>
</copy>
<foreach param="lang" target="subtask">
<fileset dir="${aclmanager.directory}/administrator/components/com_aclmanager/language">
<type type="dir" />
<depth max="0" min="0" />
</fileset>
</foreach>
</target>
<target name="subtask">
<echo msg="${lang}" />
<copy file="${aclmanager.directory}/administrator/language/${lang}/${lang}.com_aclmanager.ini" todir="${tmp_dir}/admin/language/${lang}" overwrite="true" includeEmptyDirs="no" />
<copy file="${aclmanager.directory}/administrator/language/${lang}/${lang}.com_aclmanager.sys.ini" todir="${tmp_dir}/admin/language/${lang}" overwrite="true" includeEmptyDirs="no" />
</target>
<target name="init" depends="copy">
<xmlproperty file="${aclmanager.directory}/administrator/components/com_aclmanager/aclmanager.xml" collapseAttributes="true" prefix="xml" keepRoot="false" />
<tstamp>
<format property="str.datefmt" pattern="${cfg.datefmt}" locale="${cfg.dateloc}" />
</tstamp>
<condition property="str.build" value="_${cfg.buildprefix}${build.number}" >
<istrue value="${cfg.addbuild}" />
</condition>
<condition property="str.version" value="_${cfg.versionprefix}${xml.version}" >
<istrue value="${cfg.addversion}" />
</condition>
<condition property="str.date" value="_${str.datefmt}" >
<istrue value="${cfg.adddate}" />
</condition>
<property name="str.destfile" value="${package_dir}/${cfg.prefix}${cfg.name}${str.version}" />
<condition property="do.tar">
<istrue value="${cfg.tar}" />
</condition>
<condition property="do.zip">
<istrue value="${cfg.zip}" />
</condition>
<condition property="do.gzip">
<istrue value="${cfg.gzip}" />
</condition>
<condition property="do.bz2">
<istrue value="${cfg.bz2}" />
</condition>
</target>
<target name="package" depends="init">
<condition property="version.date" value="${str.datefmt}" >
<istrue value="${cfg.adddate}" />
</condition>
<copy file="${project_dir}/administrator/components/com_aclmanager/install.aclmanager.php" todir="${tmp_dir}" overwrite="true" />
<copy file="${project_dir}/administrator/components/com_aclmanager/remove.aclmanager.php" todir="${tmp_dir}" overwrite="true" />
<copy file="${project_dir}/administrator/components/com_aclmanager/script.aclmanager.php" todir="${tmp_dir}" overwrite="true" />
<copy file="${project_dir}/administrator/components/com_aclmanager/aclmanager.xml" todir="${tmp_dir}" overwrite="true" />
<copy file="${project_dir}/administrator/components/com_aclmanager/LICENSE.txt" todir="${tmp_dir}" overwrite="true" />
<copy file="${project_dir}/administrator/components/com_aclmanager/CHANGELOG.txt" todir="${tmp_dir}" overwrite="true" />
</target>
<target name="tar" depends="package" if="do.tar">
<tar destfile="${str.destfile}.tar" basedir="${tmp_dir}" />
</target>
<target name="zip" depends="package" if="do.zip">
<zip destfile="${str.destfile}.zip" basedir="${tmp_dir}" />
</target>
<target name="gzip" depends="package" if="do.gzip">
<tar destfile="${str.destfile}.tar.gz" basedir="${tmp_dir}" compression="gzip" />
</target>
<target name="bz2" depends="package" if="do.bz2">
<tar destfile="${str.destfile}.tar.bz2" basedir="${tmp_dir}" compression="bzip2" />
</target>
<target name="cleanup" depends="zip">
<delete dir="${tmp_dir}" />
</target>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.