57 lines
2.1 KiB
XML
57 lines
2.1 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<project
|
|
name="h5ai"
|
|
basedir="."
|
|
default="release"
|
|
>
|
|
|
|
<import file="tools/wepp.ant.xml" />
|
|
|
|
<target name="init">
|
|
<property file="build.properties" />
|
|
<tstamp>
|
|
<format property="build.stamp" pattern="yyyy-MM-dd-HHmmss" />
|
|
</tstamp>
|
|
<property name="build.label" value="${project.name} ${project.version} b${build.stamp}" />
|
|
<echo>Build: ${build.label}</echo>
|
|
</target>
|
|
|
|
<target name="clean" depends="init">
|
|
<delete dir="${build.dir}" />
|
|
<delete dir="${release.dir}" />
|
|
</target>
|
|
|
|
<target name="build-prepare" depends="clean">
|
|
<mkdir dir="${build.dir}" />
|
|
<copy todir="${build.dir}">
|
|
<fileset dir="${src.dir}" />
|
|
<fileset file="LICENSE.txt" />
|
|
<fileset file="README.md" />
|
|
</copy>
|
|
<replace dir="${build.dir}">
|
|
<replacefilter token="%BUILD%" value="${build.label}" />
|
|
<replacefilter token="%BUILD_NAME%" value="${project.name}" />
|
|
<replacefilter token="%BUILD_VERSION%" value="${project.version}" />
|
|
<replacefilter token="%BUILD_STAMP%" value="${build.stamp}" />
|
|
</replace>
|
|
</target>
|
|
|
|
<target name="build" depends="build-prepare">
|
|
<wepp.dir dir="${build.dir}/h5ai/css" />
|
|
<wepp.dir dir="${build.dir}/h5ai/js" />
|
|
</target>
|
|
|
|
<target name="build-uncompressed" depends="build-prepare">
|
|
<wepp.dir dir="${build.dir}/h5ai/css" args="--nc" />
|
|
<wepp.dir dir="${build.dir}/h5ai/js" args="--nc" />
|
|
</target>
|
|
|
|
<target name="release" depends="build">
|
|
<mkdir dir="${release.dir}" />
|
|
<zip destfile="${release.dir}/${project.name}-${project.version}.zip" basedir="${build.dir}" />
|
|
<tar destfile="${release.dir}/${project.name}-${project.version}.tar" basedir="${build.dir}"/>
|
|
<gzip destfile="${release.dir}/${project.name}-${project.version}.tar.gz" src="${release.dir}/${project.name}-${project.version}.tar"/>
|
|
<delete file="${release.dir}/${project.name}-${project.version}.tar" />
|
|
</target>
|
|
|
|
</project>
|