Commit: 8706985d0a2b387d645613391e879201f0398cbd Author: Anatol Belski <[email protected]> Wed, 11 Sep 2013 09:49:38 +0200 Parents: 67053763c2e38a3e8f55cc6c3f452800f899ab3f Branches: master
Link: http://git.php.net/?p=web/rmtools.git;a=commitdiff;h=8706985d0a2b387d645613391e879201f0398cbd Log: further preparations for mailing Changed paths: M client/include/PeclExt.php M client/script/pecl.php Diff: diff --git a/client/include/PeclExt.php b/client/include/PeclExt.php index d24f86b..36e7deb 100644 --- a/client/include/PeclExt.php +++ b/client/include/PeclExt.php @@ -441,12 +441,28 @@ class PeclExt return $zip_file; } - public function mailMaintainers(array $logs) + public function mailMaintainers($success, array $logs) { + $url = 'http://windows.php.net/downloads/pecl/' . $this->name . '/' . $this->version; + if ($success) { + $msg = "PECL Windows build succeeded\n\n"; + $msg .= "The package was uploaded to $url/" . $this->getPackageName() . ".zip\n"; + } else { + $msg = "PECL Windows build failed\n\n"; + + } + $msg .= "For logs see $url/logs/" . $this->getPackageName() . "-logs.zip\n"; + + $msg . "\nHave a nice day\n"; + + rm\xmail( + 'pecl@windows', + '[email protected]', /* XXX try to get dev mails from the package.xml */ + '[PECL-DEV] Windows build: ' . $this->name . '-' . $this->version, + $msg, + $logs + ); - // $from is pecl@win - // $to is ext lead from package.xml - //xmail($from, $to, $subject, $text, $logs); } } diff --git a/client/script/pecl.php b/client/script/pecl.php index 9025efa..b85aa9f 100644 --- a/client/script/pecl.php +++ b/client/script/pecl.php @@ -75,9 +75,8 @@ foreach ($builds as $build_name) { rm\xmail( 'pecl@windows', '[email protected]', /* XXX try to get dev mails from the package.xml */ - 'PECL windows build system: ' . basename($ext_tgz), - "PECL build failed before it could start for the reasons below:\n\n" - $e->getMessage() + '[PECL-DEV] Windows build: ' . basename($ext_tgz), + "PECL build failed before it could start for the reasons below:\n\n" . $e->getMessage() ); $build->clean(); @@ -203,7 +202,7 @@ foreach ($builds as $build_name) { if (0 && $mail_maintainers) { echo "Mailing logs"; try { - $ext->mailLogs(array($logs_zip)); + $ext->mailMaintainers(0 == $build_error, array($logs_zip)); } catch (Exception $e) { echo $e->getMessage() . PHP_EOL; } -- PHP Webmaster List Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
