com web/rmtools: some more base for the pickle.php script: client/include/PickleBuildVC.php client/script/pickle.php

From: Date: Mon, 04 May 2015 20:25:32 +0000
Subject: com web/rmtools: some more base for the pickle.php script: client/include/PickleBuildVC.php client/script/pickle.php
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-26006@lists.php.net to get a copy of this message
Commit: 8b465d6f479cfd90a3ea46715e2ebb720b719764 Author: Anatol Belski <ab@php.net> Mon, 4 May 2015 22:25:32 +0200 Parents: 2e5338ddc2e4dde2bfd11b65ab00151274b9954b Branches: master pecl_legacy Link: http://git.php.net/?p=web/rmtools.git;a=commitdiff;h=8b465d6f479cfd90a3ea46715e2ebb720b719764 Log: some more base for the pickle..php script Changed paths: M client/include/PickleBuildVC.php M client/script/pickle.php Diff: diff --git a/client/include/PickleBuildVC.php b/client/include/PickleBuildVC.php index b9968e3..6a41470 100644 --- a/client/include/PickleBuildVC.php +++ b/client/include/PickleBuildVC.php @@ -95,7 +95,7 @@ class PickleBuildVC public function __destruct() { -// $this->clean(); + $this->clean(); } public function setSdkDir($sdk_dir) @@ -141,6 +141,8 @@ class PickleBuildVC $ret = exec_single_log($cmd, NULL, $this->env); chdir($old_cwd); + + return $ret; } public function archive() diff --git a/client/script/pickle.php b/client/script/pickle.php index a401496..25d5372 100644 --- a/client/script/pickle.php +++ b/client/script/pickle.php @@ -24,6 +24,10 @@ $builds = $branch->getBuildList('windows'); //var_dump($branch_name); //var_dump($builds); +$was_errors = false; + +echo "Using <$pkg_path>" . PHP_EOL . PHP_EOL; + foreach ($builds as $build_name) { echo "Starting build" . PHP_EOL; @@ -33,7 +37,26 @@ foreach ($builds as $build_name) { $build = $branch->createBuildInstance($build_name); $ext = new rm\PickleExt($pkg_path, $build); - $build->build($ext); + echo "Running pickle build" . PHP_EOL; + + $ret = $build->build($ext); + if ($ret["return_value"]) { + + /* XXX build->clean() is gonna remove all the temp files, pack the logs before */ + $build->clean(); + //$ext->cleanup(); + $was_errors = true; + + unset($ext); + unset($build); + + echo $ret["log"]; + + continue; + } + + echo "Pickle build successful, packaging logs" . PHP_EOL; + //$build->packLogs(); //$build->archive(); @@ -44,6 +67,9 @@ foreach ($builds as $build_name) { //var_dump($build); //var_dump($ext); //var_dump($build_config); + + + echo PHP_EOL; } exit(0);

« previous php.webmaster (#26006) next »