Skip to content

Commit f3b89b3

Browse files
authored
Merge pull request #377 from RamiAwar/add-macos-multiple-builds-to-landing
refactor: Updated download links for macos silicon / intel
2 parents 831d44b + 26ceb8d commit f3b89b3

File tree

3 files changed

+24
-15
lines changed

3 files changed

+24
-15
lines changed

.github/workflows/packaging.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ jobs:
155155
tar -cf ../../dataline.tar dataline
156156
- uses: actions/upload-artifact@v4
157157
with:
158-
name: dataline-${{ steps.calculate_architecture.outputs.result }}.tar
158+
name: dataline-macos-${{ steps.calculate_architecture.outputs.result }}.tar
159159
# default workdir is only for runs, here we are using "uses" so it does not apply
160160
path: dataline.tar
161161
overwrite: true

frontend/src/components/Landing/DownloadReleaseButton.tsx

+10-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useState, useEffect } from "react";
22
import { ArrowDownTrayIcon } from "@heroicons/react/20/solid";
33

4-
export type OS = "darwin" | "windows" | "linux";
4+
export type OS = "darwin-x86_64" | "darwin-arm64" | "windows" | "linux";
55

66
interface GithubReleaseAsset {
77
browser_download_url: string;
@@ -34,8 +34,10 @@ export const DownloadReleaseButton = ({ os }: { os: OS }) => {
3434

3535
const getOSName = (os: OS) => {
3636
switch (os) {
37-
case "darwin":
38-
return "macOS";
37+
case "darwin-x86_64":
38+
return "macOS (Intel)";
39+
case "darwin-arm64":
40+
return "macOS (Apple Silicon)";
3941
case "windows":
4042
return "Windows";
4143
case "linux":
@@ -47,10 +49,12 @@ export const DownloadReleaseButton = ({ os }: { os: OS }) => {
4749

4850
const getAssetName = (os: OS) => {
4951
switch (os) {
50-
case "darwin":
51-
return "dataline-macos-latest.tar.zip";
52+
case "darwin-x86_64":
53+
return "dataline-macos-x86_64.tar.zip";
54+
case "darwin-arm64":
55+
return "dataline-macos-arm64.tar.zip";
5256
case "windows":
53-
return "windows-artifact.zip";
57+
return "dataline-windows.zip";
5458
case "linux":
5559
return "dataline-linux.tar.zip";
5660
default:

frontend/src/components/Landing/InstallSection.tsx

+13-8
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export const InstallSection = () => {
2121
const detectOS = () => {
2222
const userAgent = window.navigator.userAgent.toLowerCase();
2323
if (userAgent.indexOf("win") > -1) return "Windows";
24-
if (userAgent.indexOf("mac") > -1) return "MacOS";
24+
if (userAgent.indexOf("mac") > -1) return "MacOS (Apple Silicon)";
2525
if (userAgent.indexOf("linux") > -1) return "Linux";
2626
return "All";
2727
};
@@ -34,9 +34,19 @@ export const InstallSection = () => {
3434

3535
const installationSections: Item[] = [
3636
{
37-
title: "MacOS",
37+
title: "Docker",
38+
isDownloadable: false,
39+
code: "docker run -p 7377:7377 -v dataline:/home/.dataline --name dataline ramiawar/dataline:latest",
40+
},
41+
{
42+
title: "MacOS (Intel)",
3843
isDownloadable: true,
39-
os: "darwin",
44+
os: "darwin-x86_64",
45+
},
46+
{
47+
title: "MacOS (Apple Silicon)",
48+
isDownloadable: true,
49+
os: "darwin-arm64",
4050
},
4151
{
4252
title: "Windows",
@@ -53,11 +63,6 @@ export const InstallSection = () => {
5363
isDownloadable: false,
5464
code: "brew tap ramiawar/dataline && brew install dataline",
5565
},
56-
{
57-
title: "Docker",
58-
isDownloadable: false,
59-
code: "docker run -p 7377:7377 -v dataline:/home/.dataline --name dataline ramiawar/dataline:latest",
60-
},
6166
{
6267
title: "GH Releases",
6368
code: "https://github.com/RamiAwar/dataline/releases",

0 commit comments

Comments
 (0)