Created
April 5, 2013 01:08
-
-
Save kevboutin/5315832 to your computer and use it in GitHub Desktop.
This is a custom target to use with any ant build. The idea is that this file should be included into your build script and reference the dependency target where appropriate (ex. <import file="./project.xml" /> ). This step should be used after the publish directory is loaded up with all assets and ready to be deployed/packaged. Once this target…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<target name="-tarball"> | |
<condition property="publish.exists"> | |
<available file="${dir.publish}" type="dir"/> | |
</condition> | |
<condition property="dist.exists"> | |
<available file="${dir.dist}" type="dir"/> | |
</condition> | |
<if> | |
<equals arg1="${publish.exists}" arg2="true"/> | |
<then> | |
<echo message="Compressing release into a convenient tarball within ${dir.source}/${dir.dist}"/> | |
<if> | |
<equals arg1="${dist.exists}" arg2="true"/> | |
<then> | |
<mkdir dir="${dir.dist}"/> | |
</then> | |
</if> | |
<tar destfile="${dir.dist}/release.tar" basedir="${dir.publish}" | |
includes="*,**/*"/> | |
<gzip src="${dir.dist}/release.tar" | |
destfile="${dir.dist}/release.tar.gz"/> | |
<delete file="${dir.dist}/release.tar"/> | |
</then> | |
</if> | |
</target> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment