com web/rmtools: fix calls, improve error checks: bin/pecl_bu ild_all.bat bin/pecl_build_next.bat bin/rmtools _setvars.bat bin/snap-x64.bat-dist
bin/snap.bat -dist bin/snapshot_task.bat
| From: | Anatol Belski | Date: | Wed, 12 Jul 2017 17:45:54 +0000 |
| Subject: | com web/rmtools: fix calls, improve error checks: bin/pecl_bu ild_all.bat bin/pecl_build_next.bat bin/rmtools _setvars.bat bin/snap-x64.bat-dist bin/snap.bat -dist bin/snapshot_task.bat |
||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-26216@lists.php.net to get a copy of this message | ||
Commit: ec7a5d072881bc9db32daa1a4a945b81e77d8dff
Author: Anatol Belski <ab@php.net> Wed, 12 Jul 2017 19:45:54 +0200
Parents: 34735540116447b9ef721729c7e8d362a71bab8b
Branches: master
Link: http://git.php.net/?p=web/rmtools.git;a=commitdiff;h=ec7a5d072881bc9db32daa1a4a945b81e77d8dff
Log:
fix calls, improve error checks
Changed paths:
M bin/pecl_build_all.bat
M bin/pecl_build_next.bat
M bin/rmtools_setvars.bat
M bin/snap-x64.bat-dist
M bin/snap.bat-dist
M bin/snapshot_task.bat
Diff:
diff --git a/bin/pecl_build_all.bat b/bin/pecl_build_all.bat
index 94ce2a1..ef3ad04 100644
--- a/bin/pecl_build_all.bat
+++ b/bin/pecl_build_all.bat
@@ -1,8 +1,7 @@
@ECHO OFF
-rem must be on the env already
-if "%PHP_SDK_ROOT_PATH%"=="" (
- echo PHP SDK is not setup
+if not exist %~dp0rmtools_setvars.bat (
+ echo RMTOOLS is not setup, create %~dp0rmtools_setvars..bat
exit /b 3
)
call %~dp0rmtools_setvars.bat
@@ -24,7 +23,7 @@ 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 ==========================================================
-call "%PHP_SDK_ROOT_PATH%\phpsdk-starter.bat" -c vc14 -a x64 -t
"%PHP_RMTOOLS_BIN_PATH%\pecl.bat"
+call "%PHP_RMTOOLS_PHP_SDK_ROOT_PATH%\phpsdk-starter.bat" -c vc14 -a x64 -t
"%PHP_RMTOOLS_BIN_PATH%\pecl.bat"
echo .
exit /b 0
@@ -41,14 +40,12 @@ ECHO running > "%LOCK_FILE%"
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.
-call "%PHP_SDK_ROOT_PATH%\phpsdk-starter.bat" -c vc14 -a x64 -t
"%PHP_RMTOOLS_BIN_PATH%\pecl.bat" --task-args "--config=pecl70_x64 --first %*"
>> "%LOG_FILE%" 2<&1
-call "%PHP_SDK_ROOT_PATH%\phpsdk-starter.bat" -c vc14 -a x64 -t
"%PHP_RMTOOLS_BIN_PATH%\pecl.bat" --task-args "--config=pecl70_x86 %*" >>
"%LOG_FILE%" 2<&1
-call "%PHP_SDK_ROOT_PATH%\phpsdk-starter.bat" -c vc14 -a x64 -t
"%PHP_RMTOOLS_BIN_PATH%\pecl.bat" --task-args "--config=pecl56_x64 %*" >>
"%LOG_FILE%" 2<&1
-call "%PHP_SDK_ROOT_PATH%\phpsdk-starter.bat" -c vc14 -a x64 -t
"%PHP_RMTOOLS_BIN_PATH%\pecl.bat" --task-args "--config=pecl56_x86 %*" >>
"%LOG_FILE%" 2<&1
-call "%PHP_SDK_ROOT_PATH%\phpsdk-starter.bat" -c vc14 -a x64 -t
"%PHP_RMTOOLS_BIN_PATH%\pecl.bat" --task-args "--config=pecl55_x64 %*" >>
"%LOG_FILE%" 2<&1
-call "%PHP_SDK_ROOT_PATH%\phpsdk-starter.bat" -c vc14 -a x64 -t
"%PHP_RMTOOLS_BIN_PATH%\pecl.bat" --task-args "--config=pecl55_x86 %*" >>
"%LOG_FILE%" 2<&1
-call "%PHP_SDK_ROOT_PATH%\phpsdk-starter.bat" -c vc14 -a x64 -t
"%PHP_RMTOOLS_BIN_PATH%\pecl.bat" --task-args "--config=pecl54 %*" >>
"%LOG_FILE%" 2<&1
-call "%PHP_SDK_ROOT_PATH%\phpsdk-starter.bat" -c vc14 -a x64 -t
"%PHP_RMTOOLS_BIN_PATH%\pecl.bat" --task-args "--config=pecl53 --last %*"
>> "%LOG_FILE%" 2<&1
+call "%PHP_RMTOOLS_PHP_SDK_ROOT_PATH%\phpsdk-starter.bat" -c vc14 -a x64 -t
"%PHP_RMTOOLS_BIN_PATH%\pecl.bat" --task-args "--config=pecl71_x64 --first %*"
>> "%LOG_FILE%" 2<&1
+call "%PHP_RMTOOLS_PHP_SDK_ROOT_PATH%\phpsdk-starter.bat" -c vc14 -a x86 -t
"%PHP_RMTOOLS_BIN_PATH%\pecl.bat" --task-args "--config=pecl71_x86 %*" >>
"%LOG_FILE%" 2<&1
+call "%PHP_RMTOOLS_PHP_SDK_ROOT_PATH%\phpsdk-starter.bat" -c vc14 -a x64 -t
"%PHP_RMTOOLS_BIN_PATH%\pecl.bat" --task-args "--config=pecl70_x64 %*" >>
"%LOG_FILE%" 2<&1
+call "%PHP_RMTOOLS_PHP_SDK_ROOT_PATH%\phpsdk-starter.bat" -c vc14 -a x86 -t
"%PHP_RMTOOLS_BIN_PATH%\pecl.bat" --task-args "--config=pecl70_x86 %*" >>
"%LOG_FILE%" 2<&1
+call "%PHP_RMTOOLS_PHP_SDK_ROOT_PATH%\phpsdk-starter.bat" -c vc14 -a x64 -t
"%PHP_RMTOOLS_BIN_PATH%\pecl.bat" --task-args "--config=pecl56_x64 %*" >>
"%LOG_FILE%" 2<&1
+call "%PHP_RMTOOLS_PHP_SDK_ROOT_PATH%\phpsdk-starter.bat" -c vc14 -a x86 -t
"%PHP_RMTOOLS_BIN_PATH%\pecl.bat" --task-args "--config=pecl56_x86 --last %*"
>> "%LOG_FILE%" 2<&1
echo Done.>> "%LOG_FILE%"
diff --git a/bin/pecl_build_next.bat b/bin/pecl_build_next.bat
index 7bbb409..6ad084c 100644
--- a/bin/pecl_build_next.bat
+++ b/bin/pecl_build_next.bat
@@ -3,9 +3,8 @@
rem pick the next PECL pkg and pass to pecl_build_all.bat
rem first try releases, if there aren't any, look for snaps
-rem must be on the env already
-if "%PHP_SDK_ROOT_PATH%"=="" (
- echo PHP SDK is not setup
+if not exist %~dp0rmtools_setvars.bat (
+ echo RMTOOLS is not setup, create %~dp0rmtools_setvars.bat
exit /b 3
)
call %dp0rmtools_setvars.bat
diff --git a/bin/rmtools_setvars.bat b/bin/rmtools_setvars.bat
index 5c0b41c..76d2c50 100644
--- a/bin/rmtools_setvars.bat
+++ b/bin/rmtools_setvars.bat
@@ -1,5 +1,9 @@
@echo off
+rem RMTOOLS specific, not expected to depend on the SDK
+
+set PHP_RMTOOLS_PHP_SDK_ROOT_PATH=c:\php-snap-build\php-sdk
+
set PHP_RMTOOLS_BIN_PATH=%~dp0
set PHP_RMTOOLS_BIN_PATH=%PHP_RMTOOLS_BIN_PATH:~0,-1%
diff --git a/bin/snap-x64..bat-dist b/bin/snap-x64.bat-dist
index 3de8a79..c95aaba 100644
--- a/bin/snap-x64.bat-dist
+++ b/bin/snap-x64.bat-dist
@@ -1,3 +1,10 @@
@echo off
-c:\php-snap-build\php-sdk\phpsdk-vc15-x64.bat -t c:\php-snap-build\rmtools\bin\snapshot_task.bat
--task-args "phpmaster all"
+if not exist %~dp0rmtools_setvars.bat (
+ echo RMTOOLS is not setup, create %~dp0rmtools_setvars.bat
+ exit /b 3
+)
+call %~dp0rmtools_setvars.bat
+
+call %PHP_RMTOOLS_PHP_SDK_ROOT_PATH%\phpsdk-vc15-x64.bat -t
%PHP_RMTOOLS_BIN_PATH%\snapshot_task.bat --task-args "phpmaster all"
+
diff --git a/bin/snap.bat-dist b/bin/snap.bat-dist
index 0d20e68..425e9e9 100644
--- a/bin/snap.bat-dist
+++ b/bin/snap.bat-dist
@@ -1,3 +1,9 @@
@echo off
-c:\php-snap-build\php-sdk\phpsdk-vc15-x86.bat -t c:\php-snap-build\rmtools\bin\snapshot_task.bat
--task-args "phpmaster all"
+if not exist %~dp0rmtools_setvars.bat (
+ echo RMTOOLS is not setup, create %~dp0rmtools_setvars.bat
+ exit /b 3
+)
+call %~dp0rmtools_setvars.bat
+
+call %PHP_RMTOOLS_PHP_SDK_ROOT_PATH%\phpsdk-vc15-x86.bat -t
%PHP_RMTOOLS_BIN_PATH%\bin\snapshot_task.bat --task-args "phpmaster all"
diff --git a/bin/snapshot_task.bat b/bin/snapshot_task.bat
index 3a99c0f...5173a74 100644
--- a/bin/snapshot_task.bat
+++ b/bin/snapshot_task.bat
@@ -1,5 +1,10 @@
@ECHO OFF
+if not exist %~dp0rmtools_setvars.bat (
+ echo RMTOOLS is not setup, create %~dp0rmtools_setvars.bat
+ exit /b 3
+)
+
rem must be on the env already
if "%PHP_SDK_ROOT_PATH%"=="" (
echo PHP SDK is not setup