Skip to content

Commit

Permalink
fix: Get the right release per platform
Browse files Browse the repository at this point in the history
  • Loading branch information
cyaiox committed Nov 21, 2024
1 parent 2749454 commit 358f395
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/main/src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ export function getAppVersion(): string {
}

export enum PLATFORM {
MAC = 'mac',
MAC = 'macos',
LINUX = 'linux',
WINDOWS = 'windows',
WINDOWS = 'windows64',
UNSUPPORTED = 'unsupported',
}

Expand Down
4 changes: 3 additions & 1 deletion packages/preload/src/s3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ export async function getLatestExplorerRelease(_version?: string, _isPrerelease:
const latestRelease = await fetchExplorerLatestRelease();
const releases = await fetchExplorerReleases(latestRelease['version']);
const os = (await getOSName()).toLowerCase();
const release = releases?.find(release => release.Key?.toLowerCase().includes(os));
// TODO: Get different releases based on a flag for provider
const releaseName = `_${os}.zip`.toLowerCase();
const release = releases?.find(release => release.Key?.toLowerCase().endsWith(releaseName));
if (release && release.Key) {
const versionMatch = release.Key.match(/v?\d+\.\d+\.\d+-?\w*/);

Expand Down

0 comments on commit 358f395

Please sign in to comment.