Skip to content

Commit 476bf01

Browse files
committed
Update ext.yml
1 parent 4318720 commit 476bf01

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

.github/workflows/ext.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ jobs:
183183
to_entries
184184
| map({
185185
ext: .key,
186+
display_name: .key,
186187
ver: (.value.ver[$php] // "")
187188
})
188189
| map(select(.ver != ""))[]
@@ -197,6 +198,7 @@ jobs:
197198
while IFS= read -r row; do
198199
if [[ -n "$row" ]]; then
199200
ext=$(echo "$row" | jq -r '.ext' | tr '[:upper:]' '[:lower:]')
201+
display_name=$(echo "$row" | jq -r '.display_name')
200202
ver=$(echo "$row" | jq -r '.ver')
201203
original_ext="$ext"
202204
@@ -223,10 +225,10 @@ jobs:
223225
tag="${ext}-${ver_clean}"
224226
file="php_${ext}-${ver_clean}-${PHP}-${TS}-${TOOL}-x64.zip"
225227
url="https://github.com/OSPanel/php-windows-builder/releases/download/${tag}/${file}"
226-
PLAN_JSON=$(echo "$PLAN_JSON" | jq --arg url "$url" --arg file "$file" '. + [{url:$url,file:$file}]')
228+
PLAN_JSON=$(echo "$PLAN_JSON" | jq --arg url "$url" --arg file "$file" --arg display_name "$display_name" '. + [{url:$url,file:$file,display_name:$display_name}]')
227229
228230
processed=$((processed + 1))
229-
echo "📦 [$processed/$extension_count] Planned: $ext v$ver_clean"
231+
echo "📦 [$processed/$extension_count] Planned: $display_name v$ver_clean"
230232
fi
231233
done <<< "$DOWNLOADS"
232234
@@ -269,7 +271,7 @@ jobs:
269271
$counter++
270272
$url = $item.url
271273
$file = Join-Path $target $item.file
272-
$extName = ($item.file -split '_')[1] -split '-' | Select-Object -First 1
274+
$extName = $item.display_name
273275
274276
Write-Host "📦 [$counter/$totalExtensions] Downloading: $extName" -ForegroundColor Yellow
275277
@@ -282,8 +284,13 @@ jobs:
282284
$downloadedCount++
283285
}
284286
} catch {
285-
Write-Host "❌ Failed: $extName - $($_.Exception.Message)" -ForegroundColor Red
286-
$failedExtensions += $extName
287+
$statusCode = ""
288+
if ($_.Exception.Response) {
289+
$statusCode = " (Status: $($_.Exception.Response.StatusCode.value__))"
290+
}
291+
Write-Host "❌ Failed: $extName$statusCode" -ForegroundColor Red
292+
Write-Host "🔗 URL: $url" -ForegroundColor DarkGray
293+
$failedExtensions += "$extName$statusCode"
287294
$failedCount++
288295
}
289296
}
@@ -295,7 +302,10 @@ jobs:
295302
Write-Host "❌ Failed: $failedCount extensions" -ForegroundColor $(if ($failedCount -gt 0) { 'Red' } else { 'Green' })
296303
297304
if ($failedExtensions.Count -gt 0) {
298-
Write-Host "💥 Failed extensions: $($failedExtensions -join ', ')" -ForegroundColor Red
305+
Write-Host "💥 Failed extensions:" -ForegroundColor Red
306+
foreach ($failed in $failedExtensions) {
307+
Write-Host " - $failed" -ForegroundColor Red
308+
}
299309
}
300310
301311
# Ensure at least some extensions were downloaded

0 commit comments

Comments
 (0)