com web/rmtools: add a script to build with pre versions: client/bin/pecl_build_next.bat client/bin/pecl_snap _pre.bat
| From: | Anatol Belski | Date: | Wed, 02 Nov 2016 01:36:26 +0000 |
| Subject: | com web/rmtools: add a script to build with pre versions: client/bin/pecl_build_next.bat client/bin/pecl_snap _pre.bat | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-25941@lists.php.net to get a copy of this message | ||
Commit: 29081ed8c0ee056d53156302a2896433546ef07f
Author: Anatol Belski <ab@php.net> Wed, 2 Nov 2016 02:36:26 +0100
Parents: d4054271a40395ddb632ef0606ea2f0ad2a6c7d8
Branches: master pecl_legacy
Link: http://git.php.net/?p=web/rmtools.git;a=commitdiff;h=29081ed8c0ee056d53156302a2896433546ef07f
Log:
add a script to build with pre versions
it'll need to be edited to change for a new one
Changed paths:
M client/bin/pecl_build_next.bat
A client/bin/pecl_snap_pre.bat
Diff:
diff --git a/client/bin/pecl_build_next.bat b/client/bin/pecl_build_next.bat
index 4710a44..107becf 100644
--- a/client/bin/pecl_build_next.bat
+++ b/client/bin/pecl_build_next.bat
@@ -37,18 +37,18 @@ for /r %%i in (*) do (
goto ONLY_ONE
)
-cd c:\pecl-in-pkg-56
+cd c:\pecl-in-snap-pre
for /r %%i in (*) do (
- call %BAT_DIR%pecl_build_56.bat --upload --aggregate-mail --package=%%i
+ call %BAT_DIR%pecl_snap_pre.bat --upload --is-snap --aggregate-mail --package=%%i
del %%i
goto ONLY_ONE
)
-cd c:\pecl-in-pkg-nomail-56
+cd c:\pecl-in-snap-nomail-pre
for /r %%i in (*) do (
- call %BAT_DIR%pecl_build_56.bat --upload --package=%%i
+ call %BAT_DIR%pecl_snap_pre.bat --upload --is-snap --package=%%i
del %%i
goto ONLY_ONE
)
diff --git a/client/bin/pecl_snap_pre.bat b/client/bin/pecl_snap_pre.bat
new file mode 100644
index 0000000..b0b239e
--- /dev/null
+++ b/client/bin/pecl_snap_pre.bat
@@ -0,0 +1,59 @@
+@ECHO OFF
+
+SET BAT_DIR=%~dp0
+
+set yyyy=%date:~6,4%
+set mm=%date:~3,2%
+set dd=%date:~0,2%
+
+set hh=%time:~0,2%
+if %hh% lss 10 (set hh=0%time:~1,1%)
+set nn=%time:~3,2%
+set ss=%time:~6,2%
+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
+
+if "%1"=="" goto :help
+if "%1"=="--help" goto :help
+if "%1"=="-h" goto :help
+if "%1"=="/?" goto :help
+goto :skip_help
+
+:help
+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 ==========================================================
+%BAT_DIR%pecl.bat
+GOTO EXIT_LOCKED
+
+:skip_help
+
+IF EXIST c:\php-sdk\locks\pecl.lock (
+ECHO Pecl build script is already running.
+GOTO EXIT_LOCKED
+)
+
+ECHO running > c:\php-sdk\locks\pecl.lock
+
+rem Notice the --first and the --last calls marked, that's important
+rem to maintain the state between call for the same package. For instance
+rem if --aggregate-mail is used.
+rem call %BAT_DIR%pecl.bat --config=pecl55_x64 --first %* >> %LOG_FILE% 2<&1
+rem call %BAT_DIR%pecl.bat --config=pecl55_x86 %* >> %LOG_FILE% 2<&1
+rem call %BAT_DIR%pecl.bat --config=pecl54 %* >> %LOG_FILE% 2<&1
+rem call %BAT_DIR%pecl.bat --config=pecl53 --last %* >> %LOG_FILE% 2<&1
+rem
+call %BAT_DIR%pecl.bat --config=pecl71_x86 --first %* >> %LOG_FILE% 2<&1
+call %BAT_DIR%pecl.bat --config=pecl71_x64 --last %* >> %LOG_FILE% 2<&1
+
+echo Done.>> %LOG_FILE%
+
+del c:\php-sdk\locks\pecl.lock >> %LOG_FILE% 2<&1
+
+:EXIT_LOCKED
+echo .
+