Skip to content
Draft
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
7 changes: 3 additions & 4 deletions .craft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ targets:
version "{{version}}"
license "FSL-1.1-MIT"
if OS.mac?
url "https://downloads.sentry-cdn.com/sentry-cli/{{version}}/sentry-cli-Darwin-universal"
sha256 "{{checksums.sentry-cli-Darwin-universal}}"
depends_on arch: :arm64
url "https://downloads.sentry-cdn.com/sentry-cli/{{version}}/sentry-cli-Darwin-arm64"
sha256 "{{checksums.sentry-cli-Darwin-arm64}}"
elsif OS.linux?
if Hardware::CPU.arm?
if Hardware::CPU.is_64_bit?
Expand Down Expand Up @@ -108,9 +109,7 @@ targets:
target: getsentry/sentry-cli
targetFormat: '{{{target}}}:latest'
requireNames:
- /^sentry-cli-Darwin-x86_64$/
- /^sentry-cli-Darwin-arm64$/
- /^sentry-cli-Darwin-universal$/
- /^sentry-cli-Linux-i686$/
- /^sentry-cli-Linux-x86_64$/
- /^sentry-cli-Linux-armv7$/
Expand Down
56 changes: 2 additions & 54 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ jobs:
fail-fast: false
matrix:
include:
- arch: x86_64
target: x86_64-apple-darwin
- arch: arm64
target: aarch64-apple-darwin

Expand All @@ -84,34 +82,6 @@ jobs:
- name: Add Rustup Target
run: rustup target add ${{ matrix.target }}

# On x86_64, this environment variable specifies to the openssl-sys crate
# where to find the OpenSSL library.
- name: Set OpenSSL env (x86_64)
if: matrix.arch == 'x86_64'
run: echo "X86_64_APPLE_DARWIN_OPENSSL_DIR=${{ github.workspace }}/openssl-x86_64" >> $GITHUB_ENV

- name: Get OpenSSL cache month (x86_64)
if: matrix.arch == 'x86_64'
id: cache-date
run: echo "month=$(date +%Y-%m)" >> $GITHUB_OUTPUT

- name: Cache x86_64 OpenSSL
if: matrix.arch == 'x86_64'
id: cache-openssl-x86
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # 6.1.0
with:
path: ${{ env.X86_64_APPLE_DARWIN_OPENSSL_DIR }}
key: openssl-x86_64-${{ runner.os }}-${{ steps.cache-date.outputs.month }}

# To cross-compile for x86_64 from an ARM-based macOS runner, we need to have the
# x86_64 OpenSSL libraries installed locally.
- name: Download x86_64 OpenSSL
if: matrix.arch == 'x86_64' && steps.cache-openssl-x86.outputs.cache-hit != 'true'
run: |
arch -x86_64 brew fetch --bottle-tag=tahoe openssl@3.5
mkdir -p $X86_64_APPLE_DARWIN_OPENSSL_DIR
tar xzf $(arch -x86_64 brew --cache --bottle-tag=tahoe openssl@3.5) -C $X86_64_APPLE_DARWIN_OPENSSL_DIR --strip-components=2

- name: Cache Dependencies
uses: swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # 2.9.1

Expand All @@ -127,36 +97,14 @@ jobs:
path: sentry-cli-Darwin-${{ matrix.arch }}
if-no-files-found: 'error'

macos_universal:
needs: macos
name: macOS universal
runs-on: macos-26

steps:
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # 8.0.1
with:
pattern: unsigned-bin-macos-*
merge-multiple: true

- name: Link universal binary
run: lipo -create -output sentry-cli-Darwin-universal sentry-cli-Darwin-x86_64 sentry-cli-Darwin-arm64

- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # 7.0.1
with:
name: unsigned-bin-macos-universal
path: sentry-cli-Darwin-universal
if-no-files-found: 'error'

sign-macos-binaries:
strategy:
fail-fast: false
matrix:
include:
- arch: universal
- arch: x86_64
- arch: arm64

needs: [macos, macos_universal]
needs: [macos]
name: Sign & Notarize macOS Binary (${{ matrix.arch }})
runs-on: ubuntu-24.04

Expand Down Expand Up @@ -364,7 +312,7 @@ jobs:
path: binary-artifacts
- name: Move binaries into distribution packages
run: |
mv binary-artifacts/sentry-cli-Darwin-universal npm-binary-distributions/darwin/bin/sentry-cli
mv binary-artifacts/sentry-cli-Darwin-arm64 npm-binary-distributions/darwin/bin/sentry-cli
mv binary-artifacts/sentry-cli-Linux-armv7 npm-binary-distributions/linux-arm/bin/sentry-cli
mv binary-artifacts/sentry-cli-Linux-aarch64 npm-binary-distributions/linux-arm64/bin/sentry-cli
mv binary-artifacts/sentry-cli-Linux-i686 npm-binary-distributions/linux-i686/bin/sentry-cli
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## Unreleased

We are no longer releasing Sentry CLI for Intel-based (x86_64) Macs. Starting with this release, we only publish macOS binaries for Apple Silicon (arm64), and we no longer publish the universal macOS binary. Version 3.8.0 is the last release that supports Intel-based Macs. If you use Sentry CLI on an Intel-based Mac, please pin Sentry CLI to version 3.8.0, or build it from source instead. To use a self-built binary with the `@sentry/cli` npm package, set `SENTRYCLI_SKIP_DOWNLOAD=1` when installing the package, and set `SENTRY_BINARY_PATH` to the path of your binary when running it ([#3426](https://github.com/getsentry/sentry-cli/pull/3426)).

## 3.8.0

### Improvements
Expand Down
24 changes: 22 additions & 2 deletions lib/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ function getDistributionForThisPlatform() {

let packageName = undefined;
if (platform === 'darwin') {
packageName = '@sentry/cli-darwin';
// We only release macOS binaries for Apple Silicon (arm64).
if (arch === 'arm64') {
packageName = '@sentry/cli-darwin';
}
} else if (platform === 'linux' || platform === 'freebsd' || platform === 'android') {
switch (arch) {
case 'x64':
Expand Down Expand Up @@ -91,17 +94,34 @@ function getDistributionForThisPlatform() {
return { packageName, subpath };
}

/**
* The last Sentry CLI version that shipped binaries for Intel-based (x86_64) Macs.
*/
const LAST_INTEL_MAC_VERSION = '3.8.0';

/**
* Throws an error with a message stating that Sentry CLI doesn't support the current platform.
*
* @returns nothing. It throws.
*/
function throwUnsupportedPlatformError(): void {
if (os.platform() === 'darwin' && os.arch() === 'x64') {
throw new Error(
`Sentry CLI no longer supports Intel-based (x86_64) Macs.

The last version of Sentry CLI that supports Intel-based Macs is ${LAST_INTEL_MAC_VERSION}. To keep using Sentry CLI on an Intel-based Mac, pin the "@sentry/cli" package to version ${LAST_INTEL_MAC_VERSION}.

Alternatively, build Sentry CLI from source, install this package with SENTRYCLI_SKIP_DOWNLOAD=1, and set SENTRY_BINARY_PATH to the path of your binary.

If you are on an Apple Silicon Mac, you are likely running an x64 build of Node.js under Rosetta. Switch to an arm64 build of Node.js instead.`
);
}

throw new Error(
`Unsupported operating system or architecture! Sentry CLI does not work on this architecture.

Sentry CLI supports:
- Darwin (macOS)
- Darwin (macOS) on arm64 (Apple Silicon)
- Linux and FreeBSD on x64, x86, ia32, arm64, and arm architectures
- Windows x64, x86, and ia32 architectures`
);
Expand Down
3 changes: 3 additions & 0 deletions npm-binary-distributions/darwin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,8 @@
},
"os": [
"darwin"
],
"cpu": [
"arm64"
]
}
3 changes: 2 additions & 1 deletion scripts/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ function getDownloadUrl(platform, arch) {
}
switch (platform) {
case 'darwin':
return `${releasesUrl}-Darwin-universal`;
// We only release macOS binaries for Apple Silicon (arm64).
return arch === 'arm64' ? `${releasesUrl}-Darwin-arm64` : null;
case 'win32':
return `${releasesUrl}-Windows-${archString}.exe`;
case 'linux':
Expand Down
8 changes: 0 additions & 8 deletions scripts/wheels
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,6 @@ WHEELS = (
src='sentry-cli-Darwin-arm64',
plat='macosx_11_0_arm64',
),
Wheel(
src='sentry-cli-Darwin-universal',
plat='macosx_11_0_universal2',
),
Wheel(
src='sentry-cli-Darwin-x86_64',
plat='macosx_10_15_x86_64',
),
Wheel(
src='sentry-cli-Linux-aarch64',
plat='manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_2_aarch64',
Expand Down
8 changes: 1 addition & 7 deletions src/api/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -333,13 +333,7 @@ impl Api {
pub fn get_latest_sentrycli_release(&self) -> ApiResult<Option<SentryCliRelease>> {
let resp = self.get(RELEASE_REGISTRY_LATEST_URL)?;

// Prefer universal binary on macOS
let arch = match PLATFORM {
"darwin" => "universal",
_ => ARCH,
};

let ref_name = format!("sentry-cli-{}-{arch}{EXT}", capitalize_string(PLATFORM));
let ref_name = format!("sentry-cli-{}-{ARCH}{EXT}", capitalize_string(PLATFORM));
info!("Looking for file named: {ref_name}");

if resp.status() == 200 {
Expand Down
Loading