fix(website): fetch desktop version from latest GitHub release

The download page was showing pre-release versions because it read
the version directly from package.json. Now fetches the latest
non-prerelease from the GitHub Releases API at build time, with
fallback to package.json for local dev.
This commit is contained in:
Mohamed Boudra
2026-03-29 21:12:30 +07:00
parent 971f74e2ab
commit fb42c8eea2
2 changed files with 43 additions and 19 deletions
+4 -1
View File
@@ -1,7 +1,10 @@
import * as React from "react";
import websitePackage from "../package.json";
export const desktopVersion = websitePackage.version;
declare const __DESKTOP_VERSION__: string | undefined;
export const desktopVersion =
typeof __DESKTOP_VERSION__ !== "undefined" ? __DESKTOP_VERSION__ : websitePackage.version;
export const releaseBase = `https://github.com/getpaseo/paseo/releases/download/v${desktopVersion}`;
export const macAppleSiliconDownloadUrl = `${releaseBase}/Paseo-${desktopVersion}-arm64.dmg`;
export const macIntelDownloadUrl = `${releaseBase}/Paseo-${desktopVersion}-x64.dmg`;