diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a616eaf..852a214 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,19 +22,12 @@ jobs: - runner: ubuntu-latest build_output: grok asset_name: grok-linux-x64 - target: "" - - runner: macos-latest - build_output: grok - asset_name: grok-darwin-x64 - target: --target=bun-darwin-x64 - runner: macos-latest build_output: grok asset_name: grok-darwin-arm64 - target: "" - runner: windows-latest build_output: grok.exe asset_name: grok-windows-x64.exe - target: "" runs-on: ${{ matrix.runner }} @@ -50,7 +43,7 @@ jobs: run: bun install --frozen-lockfile - name: Compile standalone binary - run: bun build --compile ${{ matrix.target }} --outfile "release/${{ matrix.build_output }}" ./src/index.ts + run: bun build --compile --outfile "release/${{ matrix.build_output }}" ./src/index.ts - name: Compute checksum (unix) if: runner.os != 'Windows' @@ -111,7 +104,6 @@ jobs: generate_release_notes: true files: | release-assets/**/grok-linux-x64 - release-assets/**/grok-darwin-x64 release-assets/**/grok-darwin-arm64 release-assets/**/grok-windows-x64.exe release-assets/checksums.txt diff --git a/README.md b/README.md index 51116fb..ca39ff2 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ curl -fsSL https://raw.githubusercontent.com/superagent-ai/grok-cli/main/install The install script downloads a standalone `**grok**` binary for your platform, places it in `**~/.grok/bin**`, and records install metadata so `**grok update**` and `**grok uninstall**` work automatically. -Supported targets: macOS Apple Silicon, macOS Intel, Linux x64, and Windows x64. +Supported targets: macOS (Apple Silicon), Linux x64, and Windows x64. Intel Macs run the ARM binary via Rosetta 2. **Installer flags:** diff --git a/install.sh b/install.sh index 6f0f793..0ca3cb4 100644 --- a/install.sh +++ b/install.sh @@ -92,7 +92,7 @@ resolve_target() { esac case "${OS}-${ARCH}" in - darwin-arm64|darwin-x64|linux-x64|windows-x64) ;; + darwin-arm64|linux-x64|windows-x64) ;; *) echo "Unsupported platform: ${OS}-${ARCH}" >&2 exit 1 diff --git a/package.json b/package.json index d74e2a9..c42140a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "grok-dev", - "version": "1.1.4-rc3", + "version": "1.1.4-rc4", "description": "An open-source AI coding agent powered by Grok, built with Bun and OpenTUI.", "type": "module", "main": "dist/index.js", diff --git a/src/utils/install-manager.test.ts b/src/utils/install-manager.test.ts index c755b76..a4fbf26 100644 --- a/src/utils/install-manager.test.ts +++ b/src/utils/install-manager.test.ts @@ -29,7 +29,7 @@ function createTempDir(prefix: string): string { describe("getReleaseTargetForPlatform", () => { it("maps supported platforms to release asset names", () => { expect(getReleaseTargetForPlatform("darwin", "arm64")?.assetName).toBe("grok-darwin-arm64"); - expect(getReleaseTargetForPlatform("darwin", "x64")?.assetName).toBe("grok-darwin-x64"); + expect(getReleaseTargetForPlatform("darwin", "x64")?.assetName).toBe("grok-darwin-arm64"); expect(getReleaseTargetForPlatform("linux", "x64")?.assetName).toBe("grok-linux-x64"); expect(getReleaseTargetForPlatform("win32", "x64")?.assetName).toBe("grok-windows-x64.exe"); expect(getReleaseTargetForPlatform("linux", "arm64")).toBeNull(); diff --git a/src/utils/install-manager.ts b/src/utils/install-manager.ts index cd5d969..9a36565 100644 --- a/src/utils/install-manager.ts +++ b/src/utils/install-manager.ts @@ -18,7 +18,7 @@ const CONFIG_FILENAMES = ["user-settings.json", "AGENTS.md"]; const DATA_ENTRIES = ["daemon.pid", "delegations", "grok.db", "models", "schedules"]; export interface ReleaseTarget { - key: "darwin-arm64" | "darwin-x64" | "linux-x64" | "windows-x64"; + key: "darwin-arm64" | "linux-x64" | "windows-x64"; assetName: string; binaryName: string; } @@ -90,10 +90,8 @@ export function getInstallMetadataPath(homeDir = os.homedir()): string { } export function getReleaseTargetForPlatform(platform = process.platform, arch = process.arch): ReleaseTarget | null { - if (platform === "darwin" && arch === "arm64") + if (platform === "darwin" && (arch === "arm64" || arch === "x64")) return { key: "darwin-arm64", assetName: "grok-darwin-arm64", binaryName: "grok" }; - if (platform === "darwin" && arch === "x64") - return { key: "darwin-x64", assetName: "grok-darwin-x64", binaryName: "grok" }; if (platform === "linux" && arch === "x64") return { key: "linux-x64", assetName: "grok-linux-x64", binaryName: "grok" }; if (platform === "win32" && arch === "x64") @@ -296,7 +294,7 @@ function getReleaseTargetForPlatformKey(key: string): ReleaseTarget | null { case "darwin-arm64": return { key, assetName: "grok-darwin-arm64", binaryName: "grok" }; case "darwin-x64": - return { key, assetName: "grok-darwin-x64", binaryName: "grok" }; + return { key: "darwin-arm64", assetName: "grok-darwin-arm64", binaryName: "grok" }; case "linux-x64": return { key, assetName: "grok-linux-x64", binaryName: "grok" }; case "windows-x64":