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
1 change: 1 addition & 0 deletions .craft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
- "npm-package"
- "mcp-server-npm-package"
- "vercel"
- "install-scripts"

Check warning on line 43 in .craft.yml

View check run for this annotation

@sentry/warden / warden: code-review

Registry includeNames drops install script checksums

`install-scripts` is added to Craft artifacts, but the registry target still filters with `/^sentry-.*\.gz$/`, so `install`/`install.ps1` never get `files.*.checksums` entries. The documented `jq '.files.install.checksums["sha256-hex"]'` verification will fail on every release; widen registry `includeNames` to include those filenames.
targets:
- name: npm
includeNames: '/^sentry-\d.*\.tgz$/'
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/cli-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -394,3 +394,15 @@
with:
name: vercel
path: vercel.zip
# The website serves these at cli.sentry.dev/install and /install.ps1.
# Releasing the same files as assets puts their checksums on GitHub and
# the release registry, so the served scripts can be checked against a
# source other than the website.
- name: Upload install scripts artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: install-scripts
path: |
apps/cli-docs/dist/install
apps/cli-docs/dist/install.ps1
if-no-files-found: error

Check warning on line 408 in .github/workflows/cli-build.yml

View check run for this annotation

@sentry/warden / warden: code-review

[CCP-N3C] Registry includeNames drops install script checksums (additional location)

`install-scripts` is added to Craft artifacts, but the registry target still filters with `/^sentry-.*\.gz$/`, so `install`/`install.ps1` never get `files.*.checksums` entries. The documented `jq '.files.install.checksums["sha256-hex"]'` verification will fail on every release; widen registry `includeNames` to include those filenames.
18 changes: 18 additions & 0 deletions apps/cli-docs/src/content/docs/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,24 @@
The installer reports its own errors to Sentry. Set `SENTRY_CLI_NO_TELEMETRY=1`
to turn this off; the CLI honors the same variable.

### Verify the Install Script

Each stable release attaches `install` and `install.ps1` to its
[GitHub release](https://github.com/getsentry/toolkit/releases), and Sentry's
release registry lists their SHA-256 checksums. To check the script against the
registry before you run it:

```bash
curl -fsSL https://cli.sentry.dev/install -o install
curl -fsSL https://release-registry.services.sentry.io/apps/sentry/latest -o release.json
expected=$(jq -er '.files.install.checksums["sha256-hex"]' release.json)

Check warning on line 77 in apps/cli-docs/src/content/docs/getting-started.mdx

View check run for this annotation

@sentry/warden / warden: code-review

[CCP-N3C] Registry includeNames drops install script checksums (additional location)

`install-scripts` is added to Craft artifacts, but the registry target still filters with `/^sentry-.*\.gz$/`, so `install`/`install.ps1` never get `files.*.checksums` entries. The documented `jq '.files.install.checksums["sha256-hex"]'` verification will fail on every release; widen registry `includeNames` to include those filenames.
echo "$expected install" | sha256sum -c - && bash install
Comment thread
sentry-junior[bot] marked this conversation as resolved.
Resolved
```

On macOS, use `shasum -a 256 -c -` instead of `sha256sum -c -`. During a release the
website can update before the registry does, so retry if the checksums differ
right after a new version ships.

### Windows (PowerShell)

On Windows, install the latest stable release from PowerShell:
Expand Down
4 changes: 4 additions & 0 deletions packages/cli/plugins/sentry-cli/skills/sentry-cli/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,10 @@
curl https://cli.sentry.dev/install -fsS | bash -s -- --no-agent-skills
curl https://cli.sentry.dev/install -fsS | SENTRY_INSTALL_DIR="$HOME/.local/bin" bash
curl https://cli.sentry.dev/install -fsS | SENTRY_INIT=1 bash
curl -fsSL https://cli.sentry.dev/install -o install
curl -fsSL https://release-registry.services.sentry.io/apps/sentry/latest -o release.json
expected=$(jq -er '.files.install.checksums["sha256-hex"]' release.json)
echo "$expected install" | sha256sum -c - && bash install

Check warning on line 381 in packages/cli/plugins/sentry-cli/skills/sentry-cli/SKILL.md

View check run for this annotation

@sentry/warden / warden: code-review

[CCP-N3C] Registry includeNames drops install script checksums (additional location)

`install-scripts` is added to Craft artifacts, but the registry target still filters with `/^sentry-.*\.gz$/`, so `install`/`install.ps1` never get `files.*.checksums` entries. The documented `jq '.files.install.checksums["sha256-hex"]'` verification will fail on every release; widen registry `includeNames` to include those filenames.

# Or install via npm/pnpm/bun
npm install -g sentry
Expand Down
Loading