diff --git a/build/scripts/build_windows.py b/build/scripts/build_windows.py index 6031d38..87df6e9 100644 --- a/build/scripts/build_windows.py +++ b/build/scripts/build_windows.py @@ -91,8 +91,30 @@ class WindowsBuilder: print(f"šŸ“¦ Output: {exe_path}") print(f" Size: {exe_path.stat().st_size / 1024 / 1024:.1f} MB") + # Generate SHA256 checksum + self.generate_checksum(exe_path) + return True + def generate_checksum(self, file_path: Path) -> None: + """Generate SHA256 checksum for file.""" + import hashlib + + print("\nšŸ“ Generating SHA256 checksum...") + sha256_hash = hashlib.sha256() + + with open(file_path, "rb") as f: + for byte_block in iter(lambda: f.read(4096), b""): + sha256_hash.update(byte_block) + + checksum = sha256_hash.hexdigest() + checksum_file = file_path.parent / f"{file_path.name}.sha256" + + checksum_file.write_text(checksum) + print(f"āœ… Checksum generated") + print(f" File: {checksum_file}") + print(f" Hash: {checksum}") + def create_msi(self) -> bool: """Create MSI installer using WiX Toolset. diff --git a/build/scripts/upload_to_packages.ps1 b/build/scripts/upload_to_packages.ps1 index 8bad813..413b937 100644 --- a/build/scripts/upload_to_packages.ps1 +++ b/build/scripts/upload_to_packages.ps1 @@ -103,7 +103,9 @@ try { -Method PUT ` -Headers $headers ` -InFile $ExePath ` - -ContentType "application/octet-stream" + -ContentType "application/octet-stream" ` + -TimeoutSec 600 ` + -ErrorAction Stop Write-Host "[OK] Executable uploaded successfully" -ForegroundColor Green }