Skip to content

Commit

Permalink
feat(website): add macos amd64 desktop
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfreska committed Oct 21, 2024
1 parent 6c7e368 commit 0be50c9
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/ten-dancers-watch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'website': minor
---

The desktop downloads now include AMD64 for macOS.
2 changes: 1 addition & 1 deletion apps/website/components/DownloadCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export function DownloadCard({
{description}
</Text>
<div className="flex flex-col gap-2">
<div className="flex items-center flex-1">
<div className="flex items-center flex-1 gap-1">
<Checkbox
aria-label="Acept the Terms of Service"
onCheckedChange={(checked) => setAccepted(!!checked)}
Expand Down
24 changes: 23 additions & 1 deletion apps/website/content/downloads.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,17 @@ export function getDownloadLinksDesktop(

const final = []

const macAmd = assets.find(
(asset) => asset.name.includes('darwin') && asset.name.includes('x64')
)
if (macAmd) {
final.push({
title: 'MacOS AMD64',
link: macAmd.browser_download_url,
tags: getTags(macAmd),
})
}

const macArm = assets.find((asset) => asset.name.includes('.dmg'))
if (macArm) {
final.push({
Expand Down Expand Up @@ -99,6 +110,8 @@ export function getDownloadLinksDesktop(
})
}

console.log(final)

return final
}

Expand All @@ -118,12 +131,21 @@ function getTags(asset: GitHubReleaseAsset): DownloadTag[] {
if (asset.name.includes('linux')) {
tags.push('linux')
}
if (asset.name.includes('amd64') || asset.name.includes('x86_64')) {
if (
asset.name.includes('amd64') ||
asset.name.includes('x86_64') ||
asset.name.includes('x64')
) {
tags.push('amd64')
}
if (asset.name.includes('arm64')) {
tags.push('arm64')
}
// We use a dmg file for the arm64 macos download.
if (asset.name.includes('dmg')) {
tags.push('macos')
tags.push('arm64')
}
return tags
}

Expand Down

0 comments on commit 0be50c9

Please sign in to comment.