I am trying to use the uptodate task to see if I need to rebuild my program.
[code]
<target name="buildrequired">
<uptodate property=Required" targetfile="build.zip">
<srcfiles dir="${unzip.location}" includes="**/*" />
</uptodate>
<antcall target="update" />
<antcall target="else" />
</target>
<target name="update" if="Required">
<echo message="A new build is required." />
</target>
<target name="else" unless="Required"
<echo message="No new build is required." />
</target>
[/code]
Based on my understanding. If the build.zip file has a last modified date
newer then any files in the ${unzip.location}, the Required property will be
set to true and a message will appear saying that a new build is required.
if the unzipped location is newer then the build.zip then a message will
appear that no new build is required. Testing this, I have tried and older
build.zip file and a newer build.zip file. Both cases Required is always
set, and a message appears saying a new build is required. Can somebody help
me figure out where I am going wrong?
Thanks.
--
View this message in context:
http://www.nabble.com/Uptodate-task-not-working-tp21461848p21461848.html
Sent from the Ant - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]