Permalink
Fetching contributors…
Cannot retrieve contributors at this time
69 lines (58 sloc) 2.02 KB
<project name="Lemur" default="package" basedir=".">
<!-- Define default for ${args} in the lein exec below. -->
<property name="args" value="" />
<macrodef name="lein">
<element name="lein-params" implicit="true"/>
<sequential>
<exec executable="lein2" failonerror="yes"
dir="${basedir}">
<arg line="${args}"/>
<env key="JVM_OPTS" value="-Droot.logger=error,file,stdout"/>
<lein-params/>
</exec>
</sequential>
</macrodef>
<target name="libdir">
<lein><arg value="libdir"/></lein>
</target>
<target name="jar">
<lein><arg value="jar"/></lein>
</target>
<target name="package" depends="libdir,jar">
<exec logError="true" executable="bash" outputproperty="jar-name">
<arg value="-c"/>
<arg value="ls target/lemur-*.jar"/>
</exec>
<fail message="Could not find lemur jar">
<condition><length string="${jar-name}" trim="true" length="0"/></condition>
</fail>
<echo message="jar ${jar-name}"/>
<exec logError="true" executable="sed" failonerror="true" inputstring="${jar-name}" outputproperty="jar-version">
<arg value="-e"/>
<arg value="s/.*lemur-\(.*\).jar/\1/"/>
</exec>
<echo message="jar ${jar-version}"/>
<tar destfile="${basedir}/releases/lemur-${jar-version}.tgz"
compression="gzip">
<tarfileset dir="${basedir}"
prefix="/lemur-${jar-version}">
<include name="README.md"/>
<include name="CHANGES.txt"/>
<include name="LICENSE"/>
<include name="project.clj"/>
<include name="lib/*.jar"/>
<include name="src/"/>
<include name="examples/"/>
</tarfileset>
<tarfileset dir="${basedir}/target"
prefix="/lemur-${jar-version}">
<include name="lemur-*.jar"/>
</tarfileset>
<tarfileset dir="${basedir}"
filemode="755"
prefix="/lemur-${jar-version}">
<include name="bin/"/>
</tarfileset>
</tar>
</target>
</project>