ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Lévy-Lambert <anto...@antbuild.com>
Subject Re: Deployment Question
Date Wed, 02 Jun 2004 18:50:25 GMT
Hi Gary,

do you expect the files to be changed both at the local and at the 
remote end ?
do you expect files to be deleted at the remote end and do you want to 
delete them at the remote end too ?

why do you say you do not want to depend on timestamps ?

If you have a situation where the files are only changed at the local 
end and you are not deleting files at the local end,
then you could ftp send a fileset restricted by the date selector, using 
as boundary date the timestamp of the last send.

Another interesting selector for you is the modified selector, which has 
been introduced in ant 1.6 and works with md5 values,
or other algorithms.

Have a look at this URL to read about selectors : 
http://ant.apache.org/manual/CoreTypes/selectors.html

Note that when using fileset(s) in the ftp task, selectors only work on 
the local end.

Antoine

Gary Eberhart wrote:

>Hello
>
>I have a bunch of files in a directory called "Web Contents". I deploy these
>files to a remote server in a directory called "application". I can only use
>FTP, no mounted drives, to send files and I can not depend on time stamps.
>The FTP task works great to send these files. However, I can't afford to
>send every file with every little change. I only want to send the changed
>files.
>
>What works,
>
>I calculate the <checksum> value for all the local files in Web Contents.
>This creates a file named filename.MD5 for each file in the Web Contents
>directory and places the .MD5 file in the same directory as the file the
>checksum value for.
>
>Then I run a remote Ant task, using AntServer/RemoteAnt, to do the same on
>the remote files.
>
>Need Help,
>
>So, for each file in the Web Contents directory I want to compare the .MD5
>file to the remote .MD5 file, if they are different I know the local and
>remote files are different. If so, I will use the FTP task to send the files
>from the Web Contents directory to the application directory.
>
>How should I do this?
>
>Maybe,
>
>1. Run the check sum task on the local and the remote files.
>2. FTP the remote .MD5 files back to the client.
>3. Use the Foreach task to run the following tasks on each file in the Web
>Contents directory.
>  a. Condition/filesmatch to compare the two checksum files.
>  b. Use an If task with nested FTP tasks to send the file if the checksums
>did not match.
>
>I feel like I'm really missing the point.
>
>Gary
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>
>  
>



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message