Commit: a4b048ca0a728faede8e291c2e2662291d7dd5a1 Author: Anatol Belski <[email protected]> Fri, 30 Aug 2013 19:00:46 +0200 Parents: 153c3d47ef36d66c550a8333a6ebedd790a137f7 Branches: master
Link: http://git.php.net/?p=web/rmtools.git;a=commitdiff;h=a4b048ca0a728faede8e291c2e2662291d7dd5a1 Log: can zip the pdb/dll built 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 3a52520..9a7c6a9 100644 --- a/client/include/PeclExt.php +++ b/client/include/PeclExt.php @@ -136,14 +136,27 @@ class PeclExt $target = TMP_DIR . DIRECTORY_SEPARATOR . $this->getPackageName(); $dll_name = 'php_' . $this->name . '.dll'; - if (!copy($base . DIRECTORY_SEPARATOR . $dll_name, $target . DIRECTORY_SEPARATOR . $dll_name)) { + $dll_file = $target . DIRECTORY_SEPARATOR . $dll_name; + if (!copy($base . DIRECTORY_SEPARATOR . $dll_name, $dll_file)) { throw new \Exception("Couldn't copy '$dll_name' into '$target'"); } $pdb_name = 'php_' . $this->name . '.pdb'; - if (!copy($base . DIRECTORY_SEPARATOR . $pdb_name, $target . DIRECTORY_SEPARATOR . $pdb_name)) { + $pdb_file = $target . DIRECTORY_SEPARATOR . $pdb_name; + if (!copy($base . DIRECTORY_SEPARATOR . $pdb_name, $pdb_file)) { throw new \Exception("Couldn't copy '$pdb_name' into '$target'"); } + + + /* pack */ + $zip_file = TMP_DIR . DIRECTORY_SEPARATOR . $this->getPackageName() . '.zip'; + $zip_cmd = $this->zip_cmd . ' -9 -D -j ' . $zip_file . ' ' . $dll_file . ' ' . $pdb_file; + system($zip_cmd, $status); + if ($status) { + throw new \Exception("Couldn't zip files for $zip_file"); + } + + return $zip_file; } public function __call($name, $args) diff --git a/client/script/pecl.php b/client/script/pecl.php index 4124b9c..f865620 100644 --- a/client/script/pecl.php +++ b/client/script/pecl.php @@ -107,13 +107,15 @@ foreach ($builds as $build_name) { } try { - $ext->preparePackage(); + $pkg_file = $ext->preparePackage(); } catch (Exception $e) { echo $e->getMessage() . "\n"; } /*rm\upload_build_result_ftp_curl($toupload_dir, $branch_name . '/r' . $last_rev);*/ + /* XXX mail the logs */ + /* XXX remove $toupload_dir */ $build->clean(); $ext->cleanup(); } -- PHP Webmaster List Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
