Skip to content

Commit bec3318

Browse files
committed
Fix small release issues
- Generate LICENSE files - Add azul.dll.lib on Windows - Add reftests properly - Fix file sizes on release page
1 parent 9832573 commit bec3318

File tree

3 files changed

+42
-2
lines changed

3 files changed

+42
-2
lines changed

.github/workflows/rust.yml

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,7 @@ jobs:
474474
touch doc/target/deploy/release/1.0.0-alpha1/azul.macos.so
475475
touch doc/target/deploy/release/1.0.0-alpha1/azul.dll
476476
touch doc/target/deploy/release/1.0.0-alpha1/azul.lib
477+
touch doc/target/deploy/release/1.0.0-alpha1/azul.dll.lib
477478
touch doc/target/deploy/release/1.0.0-alpha1/azul.pyd
478479
# Placeholder reftest
479480
mkdir -p doc/target/reftest/reftest_img
@@ -602,7 +603,8 @@ jobs:
602603
603604
# Windows
604605
find artifacts-windows -name "azul.dll" ! -name "*.lib" -exec cp {} "$RELEASE_DIR/" \; 2>/dev/null || true
605-
find artifacts-windows -name "azul.dll.lib" -exec cp {} "$RELEASE_DIR/azul.lib" \; 2>/dev/null || true
606+
find artifacts-windows -name "azul.lib" ! -name "azul.dll.lib" -exec cp {} "$RELEASE_DIR/" \; 2>/dev/null || true
607+
find artifacts-windows -name "azul.dll.lib" -exec cp {} "$RELEASE_DIR/" \; 2>/dev/null || true
606608
find artifacts-windows -name "azul.pyd" -exec cp {} "$RELEASE_DIR/" \; 2>/dev/null || true
607609
608610
# Headers
@@ -616,7 +618,33 @@ jobs:
616618
# Replace placeholder reftest with real results
617619
if [ -d artifacts-reftest ]; then
618620
rm -rf website/reftest 2>/dev/null || true
619-
cp -r artifacts-reftest website/reftest
621+
mkdir -p website/reftest
622+
cp -r artifacts-reftest/* website/reftest/
623+
# Also copy index.html to reftest.html in website root
624+
if [ -f website/reftest/index.html ]; then
625+
cp website/reftest/index.html website/reftest.html
626+
echo " [OK] Created reftest.html from reftest results"
627+
fi
628+
fi
629+
630+
# Update file sizes in release HTML
631+
# The HTML contains "N/A" or placeholder sizes that need to be replaced with real sizes
632+
if [ -d "$RELEASE_DIR" ]; then
633+
echo "Updating file sizes in release HTML..."
634+
for file in "$RELEASE_DIR"/*; do
635+
if [ -f "$file" ]; then
636+
filename=$(basename "$file")
637+
size=$(du -h "$file" | cut -f1)
638+
# Find and update the size in release HTML files
639+
for html in website/release/*.html; do
640+
if [ -f "$html" ]; then
641+
# Replace "filename - N/A" or "filename - not available" with actual size
642+
sed -i "s|${filename} - N/A|${filename} - ${size}|g" "$html" 2>/dev/null || true
643+
sed -i "s|${filename} - not available|${filename} - ${size}|g" "$html" 2>/dev/null || true
644+
fi
645+
done
646+
fi
647+
done
620648
fi
621649
622650
echo "=== Final release artifacts ==="

doc/src/dllgen/deploy.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,11 @@ impl BinaryAsset {
180180
description: "Windows 64-bit static library",
181181
platform: Platform::Windows,
182182
},
183+
BinaryAsset {
184+
filename: "azul.dll.lib",
185+
description: "Windows MSVC import library",
186+
platform: Platform::Windows,
187+
},
183188
BinaryAsset {
184189
filename: "azul.pyd",
185190
description: "Python Extension (Windows)",

doc/src/main.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1499,6 +1499,13 @@ fn generate_release_pages(
14991499
println!(" [OK] Generated: release/{}/api.json", version);
15001500
}
15011501

1502+
// Generate LICENSE files using cargo-license
1503+
if let Err(e) = dllgen::deploy::generate_license_files(version, &version_dir) {
1504+
eprintln!(" [WARN] Failed to generate license files: {}", e);
1505+
} else {
1506+
println!(" [OK] Generated: release/{}/LICENSE-*.txt", version);
1507+
}
1508+
15021509
// Generate examples.zip for this version (reads paths from api.json)
15031510
if let Err(e) = dllgen::deploy::create_examples(
15041511
version,

0 commit comments

Comments
 (0)