Commit: 964e90816da0876f85db44ac173fbf6b7fa6369d Author: Anatol Belski <[email protected]> Fri, 13 Sep 2013 18:10:16 +0200 Parents: b95b22e0a43656a200e62a2adae1309ad2264dbc Branches: master
Link: http://git.php.net/?p=web/rmtools.git;a=commitdiff;h=964e90816da0876f85db44ac173fbf6b7fa6369d Log: improved the console help message Changed paths: M client/bin/pecl.bat M client/script/pecl.php Diff: diff --git a/client/bin/pecl.bat b/client/bin/pecl.bat index 714eb4a..c7bb4d1 100644 --- a/client/bin/pecl.bat +++ b/client/bin/pecl.bat @@ -1,4 +1,5 @@ @ECHO OFF + SET BAT_DIR=%~dp0 set yyyy=%date:~6,4% @@ -14,6 +15,18 @@ set cur_date=%yyyy%%mm%%dd%-%hh%%nn%%ss% set LOG_FILE=c:\php-sdk\logs\task-pecl-%cur_date%.log set RMTOOLS_BASE_DIR=c:\php-sdk\rmtools-client +set PECL_PHP_CMD=c:\php-sdk\php\php.exe -d extension_dir=c:\php-sdk\php\ext -d extension=php_openssl.dll -d extension=php_curl.dll -d date.timezone=UTC + +if "%1"=="" ( + echo ========================================================== + echo This is the PECL build batch script. You can see the help + echo output of the underlaying worker below. Note that you have + echo to ommit the --config option when running this batch. + echo ========================================================== + %PECL_PHP_CMD% %BAT_DIR%\..\script\pecl.php + GOTO EXIT_LOCKED +) + IF EXIST c:\php-sdk\locks\pecl.lock ( ECHO Snapshot script is already running. GOTO EXIT_LOCKED @@ -72,7 +85,6 @@ SET VC11_X64_LIBPATH=C:\Windows\Microsoft.NET\Framework64\v4.0.30319;C:\Windows\ SET VC11_X64_SHELL=%comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat"" amd64 REM Run pecl.php -set PECL_PHP_CMD=c:\php-sdk\php\php.exe -d extension_dir=c:\php-sdk\php\ext -d extension=php_openssl.dll -d extension=php_curl.dll -d date.timezone=UTC SET BISON_SIMPLE=c:\php-sdk\bin\bison.simple rem XXX iterate the c:\pecl_in_pkg here and delete the packages after successful build @ECHO ON diff --git a/client/script/pecl.php b/client/script/pecl.php index b871875..1f9a4c1 100644 --- a/client/script/pecl.php +++ b/client/script/pecl.php @@ -8,7 +8,7 @@ use rmtools as rm; $shortopts = NULL; //"c:p:mu"; -$longopts = array("config:", "package:", "mail", "upload", "is-snap"); +$longopts = array("config:", "package:", "mail", "upload", "is-snap", "force-name:", "force-version:"); $options = getopt($shortopts, $longopts); @@ -17,14 +17,18 @@ $pkg_path = isset($options['package']) ? $options['package'] : NULL; $mail_maintainers = isset($options['mail']); $upload = isset($options['upload']); $is_snap = isset($options['is-snap']); +$force_name = isset($options['force-name']) ? $options['force-name'] : NULL; +$force_version = isset($options['force-version']) ? $options['force-version'] : NULL; if (NULL == $branch_name || NULL == $pkg_path) { echo "Usage: pecl.php [OPTION] ..." . PHP_EOL; - echo " --config Configuration file name without suffix, required." . PHP_EOL; - echo " --package Path to the PECL package, required." . PHP_EOL; - echo " --mail Send build logs to the extension maintainers, optional." . PHP_EOL; - echo " --upload Upload the builds to the windows.hpp.net, optional." . PHP_EOL; - echo " --is-snap The package is a snapshot, so it'll be uploaded to snaps, not releases, optional." . PHP_EOL; + echo " --config Configuration file name without suffix, required." . PHP_EOL; + echo " --package Path to the PECL package, required." . PHP_EOL; + echo " --mail Send build logs to the extension maintainers, optional." . PHP_EOL; + echo " --upload Upload the builds to the windows.hpp.net, optional." . PHP_EOL; + echo " --is-snap We upload to releases by default, but this one goes to snaps, optional." . PHP_EOL; + echo " --force-name Force this name instead of reading the package data, optional." . PHP_EOL; + echo " --force-version Force this name instead of reading the package data, optional." . PHP_EOL; echo PHP_EOL; echo "Example: pecl --config=php55_x64 --package=c:\pecl_in_pkg\some-1.0.0.tgz" . PHP_EOL; echo PHP_EOL; @@ -68,7 +72,7 @@ foreach ($builds as $build_name) { $build->setSourceDir($build_src_path); try { - $ext = new rm\PeclExt($pkg_path, $build); + $ext = new rm\PeclExt($pkg_path, $build, $force_name, $force_version); $ext->setupNonCoreExtDeps(); } catch (Exception $e) { echo $e->getMessage() . PHP_EOL; -- PHP Webmaster List Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
