Skip to content

Commit c59ae3b

Browse files
committed
I really don't understand batch scripts
1 parent a4ce9ef commit c59ae3b

File tree

3 files changed

+22
-22
lines changed

3 files changed

+22
-22
lines changed

.github/scripts/windows/build_task.bat

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ if %errorlevel% neq 0 exit /b 3
2323
del /f /q C:\Windows\System32\libssl-1_1-x64.dll >NUL 2>NUL
2424
if %errorlevel% neq 0 exit /b 3
2525

26-
call %~dp0find-target-branch.bat
26+
call %~dp0find-target-branch.bat BRANCH
27+
echo Branch: %BRANCH%
2728
set STABILITY=staging
2829
set DEPS_DIR=%PHP_BUILD_CACHE_BASE_DIR%\deps-%BRANCH%-%PHP_SDK_VS%-%PHP_SDK_ARCH%
2930
rem SDK is cached, deps info is cached as well
Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,18 @@
11
@echo off
2-
SetLocal EnableDelayedExpansion
2+
3+
for /f "usebackq tokens=3" %%i in (`findstr PHP_MAJOR_VERSION main\php_version.h`) do set BRANCH=%%i
4+
for /f "usebackq tokens=3" %%i in (`findstr PHP_MINOR_VERSION main\php_version.h`) do set BRANCH=!BRANCH!.%%i
35

46
if /i "%APPVEYOR%" equ "True" (
5-
if /i "%APPVEYOR_REPO_BRANCH:~0,4%" equ "php-" (
6-
set BRANCH=%APPVEYOR_REPO_BRANCH:~4,3%
7-
) else (
7+
if /i "%APPVEYOR_REPO_BRANCH:~0,4%" neq "php-" (
88
set BRANCH=master
99
)
1010
) else (
11-
if "%GITHUB_BASE_REF%" equ "master" (
11+
if "%GITHUB_REF%" equ "master" (
1212
set BRANCH=master
1313
) else (
14-
if "%GITHUB_HEAD_REF%" equ "master" (
14+
if "%GITHUB_BASE_REF%" equ "master" (
1515
set BRANCH=master
16-
) else (
17-
for /f "usebackq tokens=3" %%i in (`findstr PHP_MAJOR_VERSION main\php_version.h`) do set BRANCH=%%i
18-
for /f "usebackq tokens=3" %%i in (`findstr PHP_MINOR_VERSION main\php_version.h`) do set BRANCH=!BRANCH!.%%i
1916
)
2017
)
2118
)
22-
echo !BRANCH!

.github/workflows/push.yml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ env:
2222
CXX: ccache g++
2323
jobs:
2424
LINUX_X64:
25+
if: false
2526
strategy:
2627
fail-fast: false
2728
matrix:
@@ -73,6 +74,7 @@ jobs:
7374
- name: Verify generated files are up to date
7475
uses: ./.github/actions/verify-generated-files
7576
LINUX_X32:
77+
if: false
7678
name: LINUX_X32_DEBUG_ZTS
7779
runs-on: ubuntu-latest
7880
container:
@@ -119,6 +121,7 @@ jobs:
119121
-d opcache.enable_cli=1
120122
-d opcache.jit_buffer_size=16M
121123
MACOS_DEBUG_NTS:
124+
if: false
122125
runs-on: macos-11
123126
steps:
124127
- name: git checkout
@@ -178,17 +181,17 @@ jobs:
178181
run: git config --global core.autocrlf false && git config --global core.eol lf
179182
- name: git checkout
180183
uses: actions/checkout@v2
181-
- name: Setup MySQL
182-
run: |
183-
choco install mysql -y --no-progress --params="/port:3306"
184-
mysql.exe --port=3306 --user=root --password="" -e "ALTER USER 'root'@'localhost' IDENTIFIED BY 'Password12!'; FLUSH PRIVILEGES;"
185-
- name: Setup MSSQL
186-
run: |
187-
choco install sql-server-express -y --no-progress --install-arguments="/SECURITYMODE=SQL /SAPWD=Password12!"
188-
- name: Setup PostgreSQL
189-
run: |
190-
Set-Service -Name "postgresql-x64-14" -StartupType manual -Status Running
191-
pwsh -Command { $env:PGPASSWORD="root"; & "$env:PGBIN\psql" -U postgres -c "ALTER USER postgres WITH PASSWORD 'Password12!';" }
184+
# - name: Setup MySQL
185+
# run: |
186+
# choco install mysql -y --no-progress --params="/port:3306"
187+
# mysql.exe --port=3306 --user=root --password="" -e "ALTER USER 'root'@'localhost' IDENTIFIED BY 'Password12!'; FLUSH PRIVILEGES;"
188+
# - name: Setup MSSQL
189+
# run: |
190+
# choco install sql-server-express -y --no-progress --install-arguments="/SECURITYMODE=SQL /SAPWD=Password12!"
191+
# - name: Setup PostgreSQL
192+
# run: |
193+
# Set-Service -Name "postgresql-x64-14" -StartupType manual -Status Running
194+
# pwsh -Command { $env:PGPASSWORD="root"; & "$env:PGBIN\psql" -U postgres -c "ALTER USER postgres WITH PASSWORD 'Password12!';" }
192195
- name: Build
193196
run: .github/scripts/windows/build.bat
194197
- name: Test

0 commit comments

Comments
 (0)