Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jobs:
include:
- target: aarch64-apple-darwin
os: macos-14
- target: x86_64-apple-darwin
os: macos-15-intel
- target: x86_64-unknown-linux-gnu
os: ubuntu-22.04
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -81,7 +83,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-14, ubuntu-22.04]
os: [macos-14, macos-15-intel, ubuntu-22.04]
runs-on: ${{ matrix.os }}
timeout-minutes: 15
env:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ diffr main...HEAD -- src/ # merge-base comparison

## Installation

CLI and terminal UI (Apple Silicon macOS and x64 Linux):
CLI and terminal UI (Apple Silicon macOS, Intel macOS, and x64 Linux):

```sh
brew install devdotfast/tap/diffr
Expand Down
2 changes: 1 addition & 1 deletion diffr-ts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const event = decodeStructuralDiffEvent(line);
npx --package @dev.fast/diffr@0.1.3 diffr-fetch --into ./bin --required
```

Supports macOS arm64 and Linux x64. `--check` verifies an existing install without
Supports macOS arm64, macOS x64, and Linux x64. `--check` verifies an existing install without
network access. Downloads warn on network failure unless `--required`; invalid
hashes or archives always fail.

Expand Down
2 changes: 1 addition & 1 deletion diffr-ts/bin/fetch.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { fileURLToPath } from "node:url";
import { parseArgs } from "node:util";

const root = resolve(dirname(fileURLToPath(import.meta.url)), "..");
const targets = { "darwin-arm64": "aarch64-apple-darwin", "linux-x64": "x86_64-unknown-linux-gnu" };
const targets = { "darwin-arm64": "aarch64-apple-darwin", "darwin-x64": "x86_64-apple-darwin", "linux-x64": "x86_64-unknown-linux-gnu" };

try {
await main();
Expand Down
2 changes: 1 addition & 1 deletion diffr-ts/scripts/pin.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { fileURLToPath } from "node:url";
const here = dirname(fileURLToPath(import.meta.url));
const root = join(here, "..");
const version = JSON.parse(readFileSync(join(root, "package.json"), "utf8")).version;
const targets = ["aarch64-apple-darwin", "x86_64-unknown-linux-gnu"];
const targets = ["aarch64-apple-darwin", "x86_64-apple-darwin", "x86_64-unknown-linux-gnu"];
const sha256 = {};
for (const target of targets) {
const url = `https://github.com/devdotfast/diffr/releases/download/${version}/diffr-${version}-${target}.tar.gz`;
Expand Down
2 changes: 1 addition & 1 deletion diffr-ts/src/fetch.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { join } from "node:path";

const fetchScript = join(import.meta.dir, "..", "bin", "fetch.mjs");
const { version } = JSON.parse(readFileSync(join(import.meta.dir, "..", "package.json"), "utf8"));
const targets: Record<string, string> = { "darwin-arm64": "aarch64-apple-darwin", "linux-x64": "x86_64-unknown-linux-gnu" };
const targets: Record<string, string> = { "darwin-arm64": "aarch64-apple-darwin", "darwin-x64": "x86_64-apple-darwin", "linux-x64": "x86_64-unknown-linux-gnu" };
const target = targets[`${process.platform}-${process.arch}`];
const dirs: string[] = [];
afterEach(() => {
Expand Down
15 changes: 10 additions & 5 deletions scripts/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import subprocess
import tarfile

TARGETS = ("aarch64-apple-darwin", "x86_64-unknown-linux-gnu")
TARGETS = ("aarch64-apple-darwin", "x86_64-apple-darwin", "x86_64-unknown-linux-gnu")
ROOT = Path(__file__).resolve().parent.parent


Expand Down Expand Up @@ -41,15 +41,20 @@ def formula(version, output):
license all_of: ["MIT", "MPL-2.0"]

on_macos do
depends_on arch: :arm64
url "{url}-aarch64-apple-darwin.tar.gz"
sha256 "{checksums[TARGETS[0]]}"
on_arm do
url "{url}-aarch64-apple-darwin.tar.gz"
sha256 "{checksums['aarch64-apple-darwin']}"
end
on_intel do
url "{url}-x86_64-apple-darwin.tar.gz"
sha256 "{checksums['x86_64-apple-darwin']}"
end
end

on_linux do
depends_on arch: :x86_64
url "{url}-x86_64-unknown-linux-gnu.tar.gz"
sha256 "{checksums[TARGETS[1]]}"
sha256 "{checksums['x86_64-unknown-linux-gnu']}"
end

def install
Expand Down
Loading