minor tweaks to builds
This commit is contained in:
1 parent
964f1e392d
commit
5dd250fa65
6 files changed
+8
-18
No files matched your search
@@ -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
|
||||
@@ -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:**
|
||||
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -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",
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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":
|
||||
|
||||
Reference in new issue
Block a user