You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@archiva.apache.org by br...@apache.org on 2007/07/05 04:06:54 UTC
svn commit: r553362 -
/maven/archiva/trunk/maven-meeper/src/bin/synchronize/syncopate/sync
Author: brett
Date: Wed Jul 4 19:06:53 2007
New Revision: 553362
URL: http://svn.apache.org/viewvc?view=rev&rev=553362
Log:
only send mail if there were errors, or artifacts
Modified:
maven/archiva/trunk/maven-meeper/src/bin/synchronize/syncopate/sync
Modified: maven/archiva/trunk/maven-meeper/src/bin/synchronize/syncopate/sync
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/maven-meeper/src/bin/synchronize/syncopate/sync?view=diff&rev=553362&r1=553361&r2=553362
==============================================================================
--- maven/archiva/trunk/maven-meeper/src/bin/synchronize/syncopate/sync (original)
+++ maven/archiva/trunk/maven-meeper/src/bin/synchronize/syncopate/sync Wed Jul 4 19:06:53 2007
@@ -168,6 +168,8 @@
open( SYNC, "$cmd 2>&1 |" );
my $rawReportText;
+
+ my $sendMail = 0;
while( <SYNC> )
{
@@ -187,6 +189,8 @@
print REPORT "<td>" . $details[3] . " " . $details[4] . "</td>" . "\n";
print REPORT "</tr>" . "\n";
+
+ $sendMail = 1;
}
else
{
@@ -195,6 +199,14 @@
print RAW_REPORT;
}
}
+
+ close SYNC;
+ my $exitCode = $?;
+
+ if ( $exitCode != 0 )
+ {
+ $sendMail = 1;
+ }
print REPORT "</table>" . "\n";
@@ -210,8 +222,7 @@
close( RAW_REPORT );
- if ( $rawReportText )
-
+ if ( $rawReportText and $sendMail != 0 )
{
$rawReportText = $rawReportText . "\n\nYou can view the syncronization reports for today here: \n\n";