X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=pakefile.php;h=4bca828e0af3908706524d479f045fb4b08b7935;hb=175dd59489f6ca8c3b07d1c193bff745d9c421c3;hp=30acead21eca50b4ae7fad1833f71a9c1caba827;hpb=f140ea8aba41c3628c0e5e729d072729d3353558;p=plcapi.git diff --git a/pakefile.php b/pakefile.php index 30acead..4bca828 100644 --- a/pakefile.php +++ b/pakefile.php @@ -22,7 +22,7 @@ class Builder ); protected static $options = array( 'repo' => 'https://github.com/gggeek/phpxmlrpc', - 'branch' => 'php53' + 'branch' => 'master' ); public static function libVersion() @@ -78,11 +78,19 @@ class Builder //pake_echo('---'.self::$libVersion.'---'); } + /** + * @param string $name + * @return string + */ public static function tool($name) { return self::$tools[$name]; } + /** + * @param string $name + * @return string + */ public static function option($name) { return self::$options[$name]; @@ -249,8 +257,28 @@ function run_doc($task=null, $args=array(), $cliOpts=array()) // API docs // from phpdoc comments using phpdocumentor + //$cmd = Builder::tool('php'); + //pake_sh("$cmd vendor/phpdocumentor/phpdocumentor/bin/phpdoc run -d ".Builder::workspaceDir().'/src'." -t ".Builder::workspaceDir().'/doc/api --title PHP-XMLRPC'); + + // from phpdoc comments using Sami + $samiConfig = <<files() + ->exclude('debugger') + ->exclude('demo') + ->exclude('doc') + ->exclude('tests') + ->in('./build/workspace'); + return new Sami\Sami(\$iterator, array( + 'title' => 'PHP-XMLRPC', + 'build_dir' => 'build/workspace/doc/api', + 'cache_dir' => 'build/cache', + )); +EOT; + file_put_contents('build/sami_config.php', $samiConfig); $cmd = Builder::tool('php'); - pake_sh("$cmd vendor/phpdocumentor/phpdocumentor/bin/phpdoc run -d ".Builder::workspaceDir().'/src'." -t ".Builder::workspaceDir().'/doc/api --title PHP-XMLRPC'); + pake_sh("$cmd vendor/sami/sami/sami.php update -vvv build/sami_config.php"); // User Manual @@ -261,7 +289,7 @@ function run_doc($task=null, $args=array(), $cliOpts=array()) // then docbook from asciidoc /// @todo create phpxmlrpc_manual.xml with the good version number /// @todo create phpxmlrpc_manual.xml with the date set to the one of last commit (or today?) - pake_sh("$cmd -d book -b docbook $docDir/manual/phpxmlrpc_manual.adoc"); + pake_sh("$cmd -d book -b docbook $docDir/manual/phpxmlrpc_manual.adoc"); # Other tools for docbook... #