Hi All,
I trying to send a mail which will contain the success or failure
message of Build, I stuck to one problem which is like this:
I collect the build logs in various log files, but there is one
build.msg file where I collect the summary of builds which also contains
the failed messages, so my build.msg file loks something like this:
build.msg
---------
Debug Build Started Thu Apr 27 11:31:51 IST 2006
Building mmk/addressbook/taupgradedatabase Failed.
Building goldpanel Failed.
Building largescreen Failed.
So I grep these "Failed" words in separate error.txt file and than
do a word count in this error.txt, if I found 0 count than shoots a mail
of success and if word counts are greater than 0 than shoots a mail of
failure. This is what I do in my shell script:
count=`cat /usr/local/error.txt|wc -w`
echo $count
if [ ``$count'' = ''0'' ]
then
status=Pass
else
status=Fail
fi
echo "Runnning create mail script"
echo "To:$maillist" > /usr/local/mail.txt echo "Subject:Build
Summary:: $product/$VER-$RELN/$status" >>/usr/local/mail.txt
I stuck to this problem how to convert this in Ant target? Can
anybody help me out
Now I think I am very clear this time, and if anyone still not
getting me please revert back to me. Sorry for the last mail.
Regards,
Pritsh
+91 80 30298143(O)
The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain proprietary, confidential or privileged information. If you are not the
intended recipient, you should not disseminate, distribute or copy this e-mail.
Please notify the sender immediately and destroy all copies of this message and
any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should
check this email and any attachments for the presence of viruses. The company
accepts no liability for any damage caused by any virus transmitted by this
email.
www.wipro.com