Skip to content
Open
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
9 changes: 8 additions & 1 deletion .craft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ targets:
- name: npm
id: '@sentry/cli-linux-i686'
includeNames: /^sentry-cli-linux-i686-\d.*\.tgz$/
- name: npm
id: '@sentry/cli-linux-riscv64'
includeNames: /^sentry-cli-linux-riscv64-\d.*\.tgz$/
- name: npm
id: '@sentry/cli-linux-x64'
includeNames: /^sentry-cli-linux-x64-\d.*\.tgz$/
Expand Down Expand Up @@ -64,14 +67,17 @@ targets:
url "https://downloads.sentry-cdn.com/sentry-cli/{{version}}/sentry-cli-Linux-armv7"
sha256 "{{checksums.sentry-cli-Linux-armv7}}"
end
elseif Hardware::CPU.intel?
elsif Hardware::CPU.intel?
if Hardware::CPU.is_64_bit?
url "https://downloads.sentry-cdn.com/sentry-cli/{{version}}/sentry-cli-Linux-x86_64"
sha256 "{{checksums.sentry-cli-Linux-x86_64}}"
else
url "https://downloads.sentry-cdn.com/sentry-cli/{{version}}/sentry-cli-Linux-i686"
sha256 "{{checksums.sentry-cli-Linux-i686}}"
end
elsif RUBY_PLATFORM.include?("riscv64")
url "https://downloads.sentry-cdn.com/sentry-cli/{{version}}/sentry-cli-Linux-riscv64"
sha256 "{{checksums.sentry-cli-Linux-riscv64}}"
else
raise "Unsupported architecture"
end
Expand Down Expand Up @@ -115,6 +121,7 @@ requireNames:
- /^sentry-cli-Linux-x86_64$/
- /^sentry-cli-Linux-armv7$/
- /^sentry-cli-Linux-aarch64$/
- /^sentry-cli-Linux-riscv64$/
- /^sentry-cli-Windows-i686.exe$/
- /^sentry-cli-Windows-x86_64.exe$/
- /^sentry-cli-Windows-aarch64.exe$/
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ jobs:
- arch: aarch64
target: aarch64-unknown-linux-musl
container: aarch64-musl
- arch: riscv64
target: riscv64gc-unknown-linux-musl
container: riscv64gc-musl

name: Linux ${{ matrix.arch }}
runs-on: ubuntu-24.04
Expand Down Expand Up @@ -368,6 +371,7 @@ jobs:
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
mv binary-artifacts/sentry-cli-Linux-riscv64 npm-binary-distributions/linux-riscv64/bin/sentry-cli
mv binary-artifacts/sentry-cli-Linux-x86_64 npm-binary-distributions/linux-x64/bin/sentry-cli
mv binary-artifacts/sentry-cli-Windows-i686.exe npm-binary-distributions/win32-i686/bin/sentry-cli.exe
mv binary-artifacts/sentry-cli-Windows-x86_64.exe npm-binary-distributions/win32-x64/bin/sentry-cli.exe
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This is **sentry-cli**, a command-line utility for working with Sentry. It's pri
- **Primary language**: Rust (core functionality)
- **Secondary language**: JavaScript/TypeScript (npm wrapper, installation scripts)
- **Build system**: Cargo for Rust, npm/yarn for JavaScript
- **Cross-platform**: Supports multiple architectures (darwin, linux, windows, ARM variants)
- **Cross-platform**: Supports multiple architectures (darwin, linux, windows, ARM and RISC-V variants)
- **Binary distributions**: Located in `npm-binary-distributions/` for different platforms

## Project Structure
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@

## Unreleased

### Features

- Add Linux riscv64 release binaries, npm package, and Python wheel

### Fixes

- Use `elsif` in the Homebrew formula so Linux Intel and RISC-V bottles resolve correctly
- (logs) Correct the severity query example ([#3387](https://github.com/getsentry/sentry-cli/pull/3387))

## 3.6.2
Expand Down
4 changes: 4 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ fn main() -> Result<(), Box<dyn Error>> {
arch = "arm64"; // enforce Darwin naming conventions
}

if arch == "riscv64gc" {
arch = "riscv64"; // match uname -m / Node os.arch()
}

writeln!(f, "/// The platform identifier")?;
writeln!(f, "pub const PLATFORM: &str = \"{platform}\";")?;
writeln!(f, "/// The CPU architecture identifier")?;
Expand Down
6 changes: 5 additions & 1 deletion lib/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const BINARY_DISTRIBUTIONS = [
{ packageName: '@sentry/cli-linux-i686', subpath: 'bin/sentry-cli' },
{ packageName: '@sentry/cli-linux-arm64', subpath: 'bin/sentry-cli' },
{ packageName: '@sentry/cli-linux-arm', subpath: 'bin/sentry-cli' },
{ packageName: '@sentry/cli-linux-riscv64', subpath: 'bin/sentry-cli' },
{ packageName: '@sentry/cli-win32-x64', subpath: 'bin/sentry-cli.exe' },
{ packageName: '@sentry/cli-win32-i686', subpath: 'bin/sentry-cli.exe' },
{ packageName: '@sentry/cli-win32-arm64', subpath: 'bin/sentry-cli.exe' },
Expand Down Expand Up @@ -56,6 +57,9 @@ function getDistributionForThisPlatform() {
case 'arm':
packageName = '@sentry/cli-linux-arm';
break;
case 'riscv64':
packageName = '@sentry/cli-linux-riscv64';
break;
}
} else if (platform === 'win32') {
switch (arch) {
Expand Down Expand Up @@ -102,7 +106,7 @@ function throwUnsupportedPlatformError(): void {

Sentry CLI supports:
- Darwin (macOS)
- Linux and FreeBSD on x64, x86, ia32, arm64, and arm architectures
- Linux and FreeBSD on x64, x86, ia32, arm64, arm, and riscv64 architectures
- Windows x64, x86, and ia32 architectures`
);
}
Expand Down
11 changes: 11 additions & 0 deletions npm-binary-distributions/linux-riscv64/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<p align="center">
<a href="https://sentry.io/?utm_source=github&utm_medium=logo" target="_blank">
<img src="https://sentry-brand.storage.googleapis.com/sentry-wordmark-dark-280x84.png" alt="Sentry" width="280" height="84">
</a>
</p>

# Sentry CLI Linux RISC-V 64-bit Binary

This package contains the Sentry CLI binary for Linux riscv64.

See https://github.com/getsentry/sentry-cli for more information.
Empty file.
21 changes: 21 additions & 0 deletions npm-binary-distributions/linux-riscv64/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "@sentry/cli-linux-riscv64",
"version": "3.6.2",
"description": "The linux riscv64 distribution of the Sentry CLI binary.",
"repository": "https://github.com/getsentry/sentry-cli",
"license": "FSL-1.1-MIT",
"publishConfig": {
"access": "public"
},
"engines": {
"node": ">=18"
},
"os": [
"linux",
"freebsd",
"android"
],
"cpu": [
"riscv64"
]
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"@sentry/cli-linux-arm": "3.6.2",
"@sentry/cli-linux-arm64": "3.6.2",
"@sentry/cli-linux-i686": "3.6.2",
"@sentry/cli-linux-riscv64": "3.6.2",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lockfile missing new optional dependency

Medium Severity

@sentry/cli-linux-riscv64 was added to optionalDependencies without a matching package-lock.json entry. npm ci requires those files to stay in sync and already special-cases this mismatch on release branches, so Test Node and other npm ci --ignore-scripts jobs can fail until the lockfile includes the package.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 5f19c03. Configure here.

"@sentry/cli-linux-x64": "3.6.2",
"@sentry/cli-win32-i686": "3.6.2",
"@sentry/cli-win32-x64": "3.6.2",
Expand Down
3 changes: 3 additions & 0 deletions scripts/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ function getDownloadUrl(platform, arch) {
case 'arm':
archString = 'armv7';
break;
case 'riscv64':
archString = 'riscv64';
break;
default:
archString = arch;
}
Expand Down
4 changes: 4 additions & 0 deletions scripts/wheels
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ WHEELS = (
src='sentry-cli-Linux-i686',
plat='manylinux_2_17_i686.manylinux2014_i686.musllinux_1_2_i686',
),
Wheel(
src='sentry-cli-Linux-riscv64',
plat='manylinux_2_31_riscv64.musllinux_1_2_riscv64',
),
Wheel(
src='sentry-cli-Linux-x86_64',
plat='manylinux_2_17_x86_64.manylinux2014_x86_64.musllinux_1_2_x86_64',
Expand Down