2011-09-20 02:52:08 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<project name="TotalFreedomMod" default="default" basedir=".">
|
|
|
|
<description>Builds, tests, and runs the project TotalFreedomMod.</description>
|
2013-11-30 17:04:43 +00:00
|
|
|
<import file="nbproject/build-impl.xml" />
|
2014-04-21 12:37:53 +00:00
|
|
|
|
2015-09-06 21:02:10 +00:00
|
|
|
<!-- if "build.properties" exists, store that in "build.properties.exists" -->
|
|
|
|
<target name="-build-properties-exists">
|
|
|
|
<available property="build.properties.exists" file="build.properties"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- Creates build.properties, unless it exists already -->
|
|
|
|
<target name="create-build-properties" depends="-build-properties-exists" unless="build.properties.exists">
|
|
|
|
<propertyfile file="build.properties" comment="Build information. Edit this to your liking.">
|
|
|
|
<entry key="program.builder" default="unknown" />
|
|
|
|
</propertyfile>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- Pre-jar property generation -->
|
|
|
|
<target name="-pre-jar" depends="create-build-properties">
|
|
|
|
|
|
|
|
<!-- Determine git version -->
|
|
|
|
<exec executable="git" outputproperty="program.buildhead" failifexecutionfails="false" errorproperty="">
|
|
|
|
<arg value="describe"/>
|
|
|
|
<arg value="--tags"/>
|
|
|
|
<arg value="--always"/>
|
|
|
|
<arg value="HEAD"/>
|
|
|
|
</exec>
|
|
|
|
<condition property="repository.version" value="${program.buildhead}" else="unknown">
|
|
|
|
<and>
|
|
|
|
<isset property="program.buildhead"/>
|
|
|
|
<length string="${program.buildhead}" trim="yes" length="0" when="greater"/>
|
|
|
|
</and>
|
|
|
|
</condition>
|
|
|
|
|
|
|
|
<!-- Load build.properties file -->
|
|
|
|
<property file="build.properties"/>
|
2014-04-21 12:37:53 +00:00
|
|
|
|
2015-09-06 21:02:10 +00:00
|
|
|
<!-- Load buildnumber from build.properties, store in ${build.number} -->
|
|
|
|
<buildnumber file="build.properties" />
|
2014-04-21 12:37:53 +00:00
|
|
|
|
2015-09-06 21:02:10 +00:00
|
|
|
<!-- Write build info -->
|
|
|
|
<propertyfile file="${build.classes.dir}/build.properties">
|
2013-11-30 19:44:08 +00:00
|
|
|
<entry key="program.buildnumber" value="${build.number}" />
|
2015-09-06 21:02:10 +00:00
|
|
|
<entry key="program.buildhead" value="${program.buildhead}" />
|
|
|
|
<entry key="program.builder" value="${program.builder}" />
|
|
|
|
<entry key="program.builddate" type="date" value="now" pattern="yyyy-MM-dd hh:mm aa" />
|
2013-11-30 19:44:08 +00:00
|
|
|
</propertyfile>
|
|
|
|
</target>
|
2014-04-21 12:37:53 +00:00
|
|
|
|
2015-09-06 21:02:10 +00:00
|
|
|
<!-- Cleanup -->
|
2013-11-30 19:44:08 +00:00
|
|
|
<target name="-post-jar">
|
|
|
|
<delete file="${dist.dir}/README.TXT" />
|
|
|
|
<delete dir="${dist.dir}/lib/" />
|
|
|
|
</target>
|
2011-09-20 02:52:08 +00:00
|
|
|
</project>
|