svn: /web/php-rmtools/trunk/client/ include/Tools.php script/snap.php
| From: | Pierre Joye | Date: | Sat, 30 Apr 2011 14:09:43 +0000 |
| Subject: | svn: /web/php-rmtools/trunk/client/ include/Tools.php script/snap.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-10937@lists.php.net to get a copy of this message | ||
pajoye Sat, 30 Apr 2011 14:09:43 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=310667
Log:
- upload snap page on successful builds
Changed paths:
U web/php-rmtools/trunk/client/include/Tools.php
U web/php-rmtools/trunk/client/script/snap.php
Modified: web/php-rmtools/trunk/client/include/Tools.php
===================================================================
--- web/php-rmtools/trunk/client/include/Tools.php 2011-04-30 14:08:38 UTC (rev 310666)
+++ web/php-rmtools/trunk/client/include/Tools.php 2011-04-30 14:09:43 UTC (rev 310667)
@@ -125,6 +125,20 @@
return $res;
}
+function update_snapshot_page()
+{
+ include __DIR__ . '/../data/config/credentials_ftps.php';
+
+ $ftp = ftp_connect($ftp_server);
+ $login_result = ftp_login($ftp, $user_snaps, $password);
+ if (!$login_result) {
+ return false;
+ }
+ $res = ftp_raw($ftp, 'site UPDATE_SNAPS_PAGE');
+ ftp_close($ftp);
+ return $res;
+}
+
function upload_build_result_ftp_curl($src_dir, $target)
{
include __DIR__ . '/../data/config/credentials_ftps.php';
@@ -200,7 +214,7 @@
}
\curl_close($ch);
}
- \curl_multi_close($mh);
+ //\curl_multi_close($mh);
}
function send_error_notification($build_entries, $previous_revision, $current_revision, $url_log)
Modified: web/php-rmtools/trunk/client/script/snap.php
===================================================================
--- web/php-rmtools/trunk/client/script/snap.php 2011-04-30 14:08:38 UTC (rev 310666)
+++ web/php-rmtools/trunk/client/script/snap.php 2011-04-30 14:09:43 UTC (rev 310667)
@@ -129,6 +129,9 @@
if ($has_build_errors) {
rm\send_error_notification($build_errors, $branch->getPreviousRevision(), $last_rev, 'http://windows.php.net/downloads/snaps/'
. $branch_name . '/r' . $last_rev);
+} else {
+ /* if no error, let update the snapshot page */
+ rm\update_snapshot_page();
}
echo "Done.\n";