mirror of
https://github.com/zen-browser/www.git
synced 2025-07-07 17:05:32 +02:00
feat(download): enhance download page with checksum integration and platform-specific releases
- Added a new `release-data.ts` file to manage release information with dynamic checksums. - Introduced `CHECKSUMS` constant for easy access to file checksums. - Updated `PlatformDownload.astro` to support additional release types and improved type safety. - Enhanced the download page to correctly display platform-specific download links and checksums. - Refactored tests to validate the new download functionality and checksum integration.
This commit is contained in:
parent
466c829a8a
commit
6a7bd311c0
9 changed files with 231 additions and 103 deletions
|
@ -1,14 +1,12 @@
|
|||
import { CONSTANT } from '~/constants'
|
||||
|
||||
/**
|
||||
* Fetches the latest release notes from GitHub and parses the SHA-256 checksums.
|
||||
* Returns a mapping from filename to checksum.
|
||||
*/
|
||||
export async function getChecksums() {
|
||||
if (import.meta.env.DEV) {
|
||||
return {
|
||||
'zen.macos-universal.dmg': 'macsum',
|
||||
'zen.installer.exe': 'winsum',
|
||||
'zen.installer-arm64.exe': 'winarmsum',
|
||||
}
|
||||
return CONSTANT.CHECKSUMS
|
||||
}
|
||||
const res = await fetch('https://api.github.com/repos/zen-browser/desktop/releases/latest', {
|
||||
headers: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue