Skip to content

Build universal (arm64 + x86_64) release binaries - #10

Open
bryankaufman wants to merge 1 commit into
alldritt:mainfrom
bryankaufman:universal-release-binaries
Open

Build universal (arm64 + x86_64) release binaries#10
bryankaufman wants to merge 1 commit into
alldritt:mainfrom
bryankaufman:universal-release-binaries

Conversation

@bryankaufman

Copy link
Copy Markdown

What & why

The 0.4.0 release binaries are arm64-only and fail on Intel Macs with bad CPU type in executable (see #9). The Swift source is architecture-agnostic — the gap is only in how the release binary is packaged.

This PR adds Scripts/build-release.sh, which builds universal binaries so a single release runs on both Apple Silicon and Intel:

swift build -c release --arch arm64 --arch x86_64 --product <product>

and packages each as <product>-<version>.tar.gz with the binary at the archive root — matching the existing release asset layout (bin.install "<product>" in the Homebrew formula keeps working unchanged).

Usage

Scripts/build-release.sh [VERSION] [OUTPUT_DIR]

Defaults VERSION from git describe (stripping any aelint-/v prefix) and writes tarballs to release/.

Verified

Tested on an Intel Mac (Xeon W-2191B):

  • swift build -c release --arch arm64 --arch x86_64 produces x86_64 arm64 binaries for both aequery and aelint.
  • The script's output tarballs each contain a universal binary that runs (aelint --version0.4.0, aequery --version0.3.0).
  • The script fails loudly if a product comes out non-universal.

Also adds a short "Release builds" note to the README.

Fixes #9

…ase binaries

The 0.4.0 release binaries were arm64-only and failed with "bad CPU type in
executable" on Intel Macs. The Swift source is architecture-agnostic, so the
fix is purely in packaging: build universal binaries for release.

build-release.sh builds each product with `swift build --arch arm64 --arch
x86_64 -c release` and packages them as <product>-<version>.tar.gz (binary at
archive root) — matching the existing release asset layout. Also documents the
release process in the README.

Fixes alldritt#9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

aelint/aequery 0.4.0 release binaries are arm64-only (fail on Intel Macs)

1 participant