Skip to content

Commit 4bc42d8

Browse files
committed
all .bat files must use strictly CRLF
1 parent 2f0918c commit 4bc42d8

File tree

7 files changed

+258
-255
lines changed

7 files changed

+258
-255
lines changed

appveyor/build.bat

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,44 @@
1-
@echo off
2-
3-
set SDK_REMOTE=https://github.com/php/php-sdk-binary-tools.git
4-
set SDK_BRANCH=%PHP_BUILD_SDK_BRANCH%
5-
set SDK_RUNNER=%PHP_BUILD_CACHE_SDK_DIR%\phpsdk-%PHP_BUILD_CRT%-%PLATFORM%.bat
6-
7-
if not exist "%PHP_BUILD_CACHE_BASE_DIR%" (
8-
echo Creating %PHP_BUILD_CACHE_BASE_DIR%
9-
mkdir "%PHP_BUILD_CACHE_BASE_DIR%"
10-
)
11-
12-
if not exist "%PHP_BUILD_OBJ_DIR%" (
13-
echo Creating %PHP_BUILD_OBJ_DIR%
14-
mkdir "%PHP_BUILD_OBJ_DIR%"
15-
)
16-
17-
if not exist "%SDK_RUNNER%" (
18-
if exist "%PHP_BUILD_CACHE_SDK_DIR%" rmdir /s /q "%PHP_BUILD_CACHE_SDK_DIR%"
19-
)
20-
21-
if not exist "%PHP_BUILD_CACHE_SDK_DIR%" (
22-
echo Cloning remote SDK repository
23-
git clone --branch %SDK_BRANCH% %SDK_REMOTE% "%PHP_BUILD_CACHE_SDK_DIR%" 2>&1
24-
)
25-
26-
for /f "tokens=*" %%a in ('type %PHP_BUILD_CACHE_SDK_DIR%\VERSION') do set GOT_SDK_VER=%%a
27-
echo Got SDK version %GOT_SDK_VER%
28-
if NOT "%GOT_SDK_VER%" == "%PHP_BUILD_SDK_BRANCH:~8%" (
29-
echo Switching to the configured SDK version %SDK_BRANCH:~8%
30-
echo Fetching remote SDK repository
31-
git --git-dir="%PHP_BUILD_CACHE_SDK_DIR%\.git" --work-tree="%PHP_BUILD_CACHE_SDK_DIR%" fetch --prune origin 2>&1
32-
echo Checkout SDK repository branch
33-
git --git-dir="%PHP_BUILD_CACHE_SDK_DIR%\.git" --work-tree="%PHP_BUILD_CACHE_SDK_DIR%" checkout --force %SDK_BRANCH%
34-
)
35-
36-
if not exist "%SDK_RUNNER%" (
37-
echo "%SDK_RUNNER%" doesn't exist
38-
exit /b 3
39-
)
40-
41-
cmd /c %SDK_RUNNER% -t %APPVEYOR_BUILD_FOLDER%\appveyor\build_task.bat
42-
if %errorlevel% neq 0 exit /b 3
43-
44-
exit /b 0
1+
@echo off
2+
3+
set SDK_REMOTE=https://github.com/php/php-sdk-binary-tools.git
4+
set SDK_BRANCH=%PHP_BUILD_SDK_BRANCH%
5+
set SDK_RUNNER=%PHP_BUILD_CACHE_SDK_DIR%\phpsdk-%PHP_BUILD_CRT%-%PLATFORM%.bat
6+
7+
if not exist "%PHP_BUILD_CACHE_BASE_DIR%" (
8+
echo Creating %PHP_BUILD_CACHE_BASE_DIR%
9+
mkdir "%PHP_BUILD_CACHE_BASE_DIR%"
10+
)
11+
12+
if not exist "%PHP_BUILD_OBJ_DIR%" (
13+
echo Creating %PHP_BUILD_OBJ_DIR%
14+
mkdir "%PHP_BUILD_OBJ_DIR%"
15+
)
16+
17+
if not exist "%SDK_RUNNER%" (
18+
if exist "%PHP_BUILD_CACHE_SDK_DIR%" rmdir /s /q "%PHP_BUILD_CACHE_SDK_DIR%"
19+
)
20+
21+
if not exist "%PHP_BUILD_CACHE_SDK_DIR%" (
22+
echo Cloning remote SDK repository
23+
git clone --branch %SDK_BRANCH% %SDK_REMOTE% "%PHP_BUILD_CACHE_SDK_DIR%" 2>&1
24+
)
25+
26+
for /f "tokens=*" %%a in ('type %PHP_BUILD_CACHE_SDK_DIR%\VERSION') do set GOT_SDK_VER=%%a
27+
echo Got SDK version %GOT_SDK_VER%
28+
if NOT "%GOT_SDK_VER%" == "%PHP_BUILD_SDK_BRANCH:~8%" (
29+
echo Switching to the configured SDK version %SDK_BRANCH:~8%
30+
echo Fetching remote SDK repository
31+
git --git-dir="%PHP_BUILD_CACHE_SDK_DIR%\.git" --work-tree="%PHP_BUILD_CACHE_SDK_DIR%" fetch --prune origin 2>&1
32+
echo Checkout SDK repository branch
33+
git --git-dir="%PHP_BUILD_CACHE_SDK_DIR%\.git" --work-tree="%PHP_BUILD_CACHE_SDK_DIR%" checkout --force %SDK_BRANCH%
34+
)
35+
36+
if not exist "%SDK_RUNNER%" (
37+
echo "%SDK_RUNNER%" doesn't exist
38+
exit /b 3
39+
)
40+
41+
cmd /c %SDK_RUNNER% -t %APPVEYOR_BUILD_FOLDER%\appveyor\build_task.bat
42+
if %errorlevel% neq 0 exit /b 3
43+
44+
exit /b 0

appveyor/build_task.bat

Lines changed: 73 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,73 @@
1-
@echo off
2-
3-
if "%APPVEYOR%" equ "True" rmdir /s /q C:\cygwin >NUL 2>NUL
4-
if %errorlevel% neq 0 exit /b 3
5-
if "%APPVEYOR%" equ "True" rmdir /s /q C:\cygwin64 >NUL 2>NUL
6-
if %errorlevel% neq 0 exit /b 3
7-
if "%APPVEYOR%" equ "True" rmdir /s /q C:\mingw >NUL 2>NUL
8-
if %errorlevel% neq 0 exit /b 3
9-
if "%APPVEYOR%" equ "True" rmdir /s /q C:\mingw-w64 >NUL 2>NUL
10-
if %errorlevel% neq 0 exit /b 3
11-
if "%APPVEYOR%" equ "True" rmdir /s /q C:\msys64 >NUL 2>NUL
12-
if %errorlevel% neq 0 exit /b 3
13-
if "%APPVEYOR%" equ "True" rmdir /s /q c:\OpenSSL-Win32 >NUL 2>NUL
14-
if %errorlevel% neq 0 exit /b 3
15-
if "%APPVEYOR%" equ "True" rmdir /s /q c:\OpenSSL-Win64 >NUL 2>NUL
16-
if %errorlevel% neq 0 exit /b 3
17-
if "%APPVEYOR%" equ "True" rmdir /s /q c:\OpenSSL-v11-Win32 >NUL 2>NUL
18-
if %errorlevel% neq 0 exit /b 3
19-
if "%APPVEYOR%" equ "True" rmdir /s /q c:\OpenSSL-v11-Win64 >NUL 2>NUL
20-
if %errorlevel% neq 0 exit /b 3
21-
if "%APPVEYOR%" equ "True" del /f /q C:\Windows\System32\libcrypto-1_1-x64.dll >NUL 2>NUL
22-
if %errorlevel% neq 0 exit /b 3
23-
if "%APPVEYOR%" equ "True" del /f /q C:\Windows\System32\libssl-1_1-x64.dll >NUL 2>NUL
24-
if %errorlevel% neq 0 exit /b 3
25-
26-
cd /D %APPVEYOR_BUILD_FOLDER%
27-
if %errorlevel% neq 0 exit /b 3
28-
29-
if /i "%APPVEYOR_REPO_BRANCH:~0,4%" equ "php-" (
30-
set BRANCH=%APPVEYOR_REPO_BRANCH:~4,3%
31-
) else (
32-
set BRANCH=master
33-
)
34-
set STABILITY=staging
35-
set DEPS_DIR=%PHP_BUILD_CACHE_BASE_DIR%\deps-%BRANCH%-%PHP_SDK_VS%-%PHP_SDK_ARCH%
36-
rem SDK is cached, deps info is cached as well
37-
echo Updating dependencies in %DEPS_DIR%
38-
cmd /c phpsdk_deps --update --no-backup --branch %BRANCH% --stability %STABILITY% --deps %DEPS_DIR% --crt %PHP_BUILD_CRT%
39-
if %errorlevel% neq 0 exit /b 3
40-
41-
rem Something went wrong, most likely when concurrent builds were to fetch deps
42-
rem updates. It might be, that some locking mechanism is needed.
43-
if not exist "%DEPS_DIR%" (
44-
cmd /c phpsdk_deps --update --force --no-backup --branch %BRANCH% --stability %STABILITY% --deps %DEPS_DIR%
45-
)
46-
if %errorlevel% neq 0 exit /b 3
47-
48-
cmd /c buildconf.bat --force
49-
if %errorlevel% neq 0 exit /b 3
50-
51-
if "%THREAD_SAFE%" equ "0" set ADD_CONF=%ADD_CONF% --disable-zts
52-
if "%INTRINSICS%" neq "" set ADD_CONF=%ADD_CONF% --enable-native-intrinsics=%INTRINSICS%
53-
54-
set EXT_EXCLUDE_FROM_TEST=snmp,oci8_12c,pdo_oci,pdo_firebird,ldap,imap,ftp
55-
if "%OPCACHE%" equ "0" set EXT_EXCLUDE_FROM_TEST=%EXT_EXCLUDE_FROM_TEST%,opcache
56-
57-
set CFLAGS=/W1 /WX
58-
59-
cmd /c configure.bat ^
60-
--enable-snapshot-build ^
61-
--disable-debug-pack ^
62-
--enable-com-dotnet=shared ^
63-
--without-analyzer ^
64-
--enable-object-out-dir=%PHP_BUILD_OBJ_DIR% ^
65-
--with-php-build=%DEPS_DIR% ^
66-
%ADD_CONF% ^
67-
--with-test-ini-ext-exclude=%EXT_EXCLUDE_FROM_TEST%
68-
if %errorlevel% neq 0 exit /b 3
69-
70-
nmake /NOLOGO
71-
if %errorlevel% neq 0 exit /b 3
72-
73-
exit /b 0
1+
@echo off
2+
3+
if "%APPVEYOR%" equ "True" rmdir /s /q C:\cygwin >NUL 2>NUL
4+
if %errorlevel% neq 0 exit /b 3
5+
if "%APPVEYOR%" equ "True" rmdir /s /q C:\cygwin64 >NUL 2>NUL
6+
if %errorlevel% neq 0 exit /b 3
7+
if "%APPVEYOR%" equ "True" rmdir /s /q C:\mingw >NUL 2>NUL
8+
if %errorlevel% neq 0 exit /b 3
9+
if "%APPVEYOR%" equ "True" rmdir /s /q C:\mingw-w64 >NUL 2>NUL
10+
if %errorlevel% neq 0 exit /b 3
11+
if "%APPVEYOR%" equ "True" rmdir /s /q C:\msys64 >NUL 2>NUL
12+
if %errorlevel% neq 0 exit /b 3
13+
if "%APPVEYOR%" equ "True" rmdir /s /q c:\OpenSSL-Win32 >NUL 2>NUL
14+
if %errorlevel% neq 0 exit /b 3
15+
if "%APPVEYOR%" equ "True" rmdir /s /q c:\OpenSSL-Win64 >NUL 2>NUL
16+
if %errorlevel% neq 0 exit /b 3
17+
if "%APPVEYOR%" equ "True" rmdir /s /q c:\OpenSSL-v11-Win32 >NUL 2>NUL
18+
if %errorlevel% neq 0 exit /b 3
19+
if "%APPVEYOR%" equ "True" rmdir /s /q c:\OpenSSL-v11-Win64 >NUL 2>NUL
20+
if %errorlevel% neq 0 exit /b 3
21+
if "%APPVEYOR%" equ "True" del /f /q C:\Windows\System32\libcrypto-1_1-x64.dll >NUL 2>NUL
22+
if %errorlevel% neq 0 exit /b 3
23+
if "%APPVEYOR%" equ "True" del /f /q C:\Windows\System32\libssl-1_1-x64.dll >NUL 2>NUL
24+
if %errorlevel% neq 0 exit /b 3
25+
26+
cd /D %APPVEYOR_BUILD_FOLDER%
27+
if %errorlevel% neq 0 exit /b 3
28+
29+
if /i "%APPVEYOR_REPO_BRANCH:~0,4%" equ "php-" (
30+
set BRANCH=%APPVEYOR_REPO_BRANCH:~4,3%
31+
) else (
32+
set BRANCH=master
33+
)
34+
set STABILITY=staging
35+
set DEPS_DIR=%PHP_BUILD_CACHE_BASE_DIR%\deps-%BRANCH%-%PHP_SDK_VS%-%PHP_SDK_ARCH%
36+
rem SDK is cached, deps info is cached as well
37+
echo Updating dependencies in %DEPS_DIR%
38+
cmd /c phpsdk_deps --update --no-backup --branch %BRANCH% --stability %STABILITY% --deps %DEPS_DIR% --crt %PHP_BUILD_CRT%
39+
if %errorlevel% neq 0 exit /b 3
40+
41+
rem Something went wrong, most likely when concurrent builds were to fetch deps
42+
rem updates. It might be, that some locking mechanism is needed.
43+
if not exist "%DEPS_DIR%" (
44+
cmd /c phpsdk_deps --update --force --no-backup --branch %BRANCH% --stability %STABILITY% --deps %DEPS_DIR%
45+
)
46+
if %errorlevel% neq 0 exit /b 3
47+
48+
cmd /c buildconf.bat --force
49+
if %errorlevel% neq 0 exit /b 3
50+
51+
if "%THREAD_SAFE%" equ "0" set ADD_CONF=%ADD_CONF% --disable-zts
52+
if "%INTRINSICS%" neq "" set ADD_CONF=%ADD_CONF% --enable-native-intrinsics=%INTRINSICS%
53+
54+
set EXT_EXCLUDE_FROM_TEST=snmp,oci8_12c,pdo_oci,pdo_firebird,ldap,imap,ftp
55+
if "%OPCACHE%" equ "0" set EXT_EXCLUDE_FROM_TEST=%EXT_EXCLUDE_FROM_TEST%,opcache
56+
57+
set CFLAGS=/W1 /WX
58+
59+
cmd /c configure.bat ^
60+
--enable-snapshot-build ^
61+
--disable-debug-pack ^
62+
--enable-com-dotnet=shared ^
63+
--without-analyzer ^
64+
--enable-object-out-dir=%PHP_BUILD_OBJ_DIR% ^
65+
--with-php-build=%DEPS_DIR% ^
66+
%ADD_CONF% ^
67+
--with-test-ini-ext-exclude=%EXT_EXCLUDE_FROM_TEST%
68+
if %errorlevel% neq 0 exit /b 3
69+
70+
nmake /NOLOGO
71+
if %errorlevel% neq 0 exit /b 3
72+
73+
exit /b 0

appveyor/test.bat

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
@echo off
2-
3-
set SDK_RUNNER=%PHP_BUILD_CACHE_SDK_DIR%\phpsdk-%PHP_BUILD_CRT%-%PLATFORM%.bat
4-
if not exist "%SDK_RUNNER%" (
5-
echo "%SDK_RUNNER%" doesn't exist
6-
exit /b 3
7-
)
8-
9-
cmd /c %SDK_RUNNER% -t %APPVEYOR_BUILD_FOLDER%\appveyor\test_task.bat
10-
if %errorlevel% neq 0 exit /b 3
11-
12-
exit /b 0
1+
@echo off
2+
3+
set SDK_RUNNER=%PHP_BUILD_CACHE_SDK_DIR%\phpsdk-%PHP_BUILD_CRT%-%PLATFORM%.bat
4+
if not exist "%SDK_RUNNER%" (
5+
echo "%SDK_RUNNER%" doesn't exist
6+
exit /b 3
7+
)
8+
9+
cmd /c %SDK_RUNNER% -t %APPVEYOR_BUILD_FOLDER%\appveyor\test_task.bat
10+
if %errorlevel% neq 0 exit /b 3
11+
12+
exit /b 0

0 commit comments

Comments
 (0)