ci: 将jq安装步骤移至copy_libcore.bat脚本中
将jq的安装从docker.yml工作流文件移至copy_libcore.bat脚本中,以简化CI配置并集中管理依赖安装
This commit is contained in:
parent
8b8d29dd00
commit
9873f670fa
@ -131,18 +131,6 @@ jobs:
|
||||
shell: cmd
|
||||
run: call copy_libcore.bat
|
||||
|
||||
- name: Install jq
|
||||
shell: powershell
|
||||
run: |
|
||||
if (!(Get-Command choco -ErrorAction SilentlyContinue)) {
|
||||
Set-ExecutionPolicy Bypass -Scope Process -Force
|
||||
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
|
||||
iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
|
||||
}
|
||||
choco install jq -y
|
||||
$env:Path = [System.Environment]::GetEnvironmentVariable('Path','Machine') + ';' + [System.Environment]::GetEnvironmentVariable('Path','User')
|
||||
jq --version
|
||||
|
||||
- name: Setup Flutter
|
||||
uses: subosito/flutter-action@v2
|
||||
with:
|
||||
|
||||
@ -22,10 +22,30 @@ for /r %%f in (libcore.dll) do (
|
||||
if exist "%%f" (
|
||||
echo ✅ 找到 libcore.dll: %%f
|
||||
copy "%%f" libcore\bin\libcore.dll
|
||||
goto :verify
|
||||
goto :install_jq
|
||||
)
|
||||
)
|
||||
echo ⚠️ 未找到 libcore.dll
|
||||
|
||||
:install_jq
|
||||
echo 📦 安装 jq...
|
||||
powershell -Command "
|
||||
if (!(Get-Command choco -ErrorAction SilentlyContinue)) {
|
||||
Set-ExecutionPolicy Bypass -Scope Process -Force;
|
||||
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072;
|
||||
iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
|
||||
}
|
||||
choco install jq -y
|
||||
$env:Path = [System.Environment]::GetEnvironmentVariable('Path','Machine') + ';' + [System.Environment]::GetEnvironmentVariable('Path','User')
|
||||
jq --version
|
||||
"
|
||||
if %ERRORLEVEL% neq 0 (
|
||||
echo ❌ jq 安装失败
|
||||
exit /b 1
|
||||
)
|
||||
echo ✅ jq 安装成功
|
||||
|
||||
goto :verify
|
||||
:verify
|
||||
|
||||
echo.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user