Skip to content

Commit d5d8a91

Browse files
authored
Replace shell: cmd with shell: bash (#9359)
2 parents b8351fd + 7293147 commit d5d8a91

3 files changed

Lines changed: 16 additions & 25 deletions

File tree

.github/workflows/test-windows.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,9 @@ jobs:
188188
# trim ~150MB for each job
189189
- name: Optimize build cache
190190
if: steps.build-cache.outputs.cache-hit != 'true'
191-
run: rmdir /S /Q winbuild\build\src
192-
shell: cmd
191+
run: |
192+
rm -rf winbuild\build\src
193+
shell: bash
193194

194195
- name: Build Pillow
195196
run: |
@@ -206,9 +207,7 @@ jobs:
206207
207208
- name: Test Pillow
208209
run: |
209-
path %GITHUB_WORKSPACE%\winbuild\build\bin;%PATH%
210210
.ci\test.cmd
211-
shell: cmd
212211
213212
- name: Prepare to upload errors
214213
if: failure()

.github/workflows/wheels.yml

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -186,24 +186,18 @@ jobs:
186186

187187
- name: Build wheels
188188
run: |
189-
setlocal EnableDelayedExpansion
190-
for %%f in (winbuild\build\license\*) do (
191-
set x=%%~nf
192-
rem Skip FriBiDi license, it is not included in the wheel.
193-
set fribidi=!x:~0,7!
194-
if NOT !fribidi!==fribidi (
195-
rem Skip imagequant license, it is not included in the wheel.
196-
set libimagequant=!x:~0,13!
197-
if NOT !libimagequant!==libimagequant (
198-
echo. >> LICENSE
199-
echo ===== %%~nf ===== >> LICENSE
200-
echo. >> LICENSE
201-
type %%f >> LICENSE
202-
)
203-
)
204-
)
205-
call winbuild\\build\\build_env.cmd
206-
%pythonLocation%\python.exe -m cibuildwheel . --output-dir wheelhouse
189+
for f in winbuild/build/license/*; do
190+
name=$(basename "${f%.*}")
191+
# Skip FriBiDi license, it is not included in the wheel.
192+
[[ $name == fribidi* ]] && continue
193+
# Skip imagequant license, it is not included in the wheel.
194+
[[ $name == libimagequant* ]] && continue
195+
echo "" >> LICENSE
196+
echo "===== $name =====" >> LICENSE
197+
echo "" >> LICENSE
198+
cat "$f" >> LICENSE
199+
done
200+
cmd //c "winbuild\\build\\build_env.cmd && $pythonLocation\\python.exe -m cibuildwheel . --output-dir wheelhouse"
207201
env:
208202
CIBW_ARCHS: ${{ matrix.cibw_arch }}
209203
CIBW_BEFORE_ALL: "{package}\\winbuild\\build\\build_dep_all.cmd"
@@ -217,7 +211,7 @@ jobs:
217211
-e CI -e GITHUB_ACTIONS
218212
mcr.microsoft.com/windows/servercore:ltsc2022
219213
powershell C:\pillow\.github\workflows\wheels-test.ps1 %CD%\..\venv-test'
220-
shell: cmd
214+
shell: bash
221215

222216
- name: Upload wheels
223217
uses: actions/upload-artifact@v6

.github/zizmor.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# https://docs.zizmor.sh/configuration/
22
rules:
3-
obfuscation:
4-
disable: true
53
unpinned-uses:
64
config:
75
policies:

0 commit comments

Comments
 (0)