com web/rmtools: further preparations for mailing: client/include/PeclExt.php client/script/pecl.php
| From: | Stephen A. Zarkos | Date: | Wed, 11 Sep 2013 07:49:38 +0000 |
| Subject: | com web/rmtools: further preparations for mailing: client/include/PeclExt.php client/script/pecl.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-16703@lists.php.net to get a copy of this message | ||
Commit: 8706985d0a2b387d645613391e879201f0398cbd
Author: Anatol Belski <ab@php.net> 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',
+ 'ab@php.net', /* 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',
'ab@php.net', /* 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;
}