Dashboard › cli › Distillation
3f19a9cd-e225-4737-91b2-06ab8ce22dea["lore_tm_v1_iibVkaF8XgJQTFLyZWzgx0kb54jaYXRfXLY2JX8wRI8","lore_tm_v1_ypCrmtTHiMoVBQFMbdE9GIB1hFqDSIboK1l6qjIam4Q","lore_tm_v1_HDfLFshfgzRgUnLqYMuDjLX2qBwe30qxcPPFnFpDMys"]
packages/cli/src/commands/cli/upgrade.ts states package managers always need network access to fetch and install packages; offline upgrade mode is supported only for curl-installed binaries.validateMethod(method, versionArg, channel, offline), method === "unknown" throws new UpgradeError("unknown_method"); a pinned stable version with Homebrew throws UpgradeError("unsupported_operation", "Homebrew does not support installing a specific version. Run 'brew upgrade getsentry/tools/sentry' to upgrade to the latest formula version."); offline mode with any method other than "curl" throws UpgradeError("unsupported_operation", "Offline upgrade is only supported for curl-installed binaries.").packages/cli/src/commands/cli/upgrade.ts states nightly builds are GitHub-only, so pinned nightly versions always use curl/GitHub lookup regardless of the current installation method.packages/cli/src/commands/cli/upgrade.ts changed from versionExists(lookupMethod, target) plus a direct "version_not_found" error to source = (await resolvePinnedVersion(lookupMethod, target)) ?? source; lookupMethod remains channel === "nightly" ? "curl" : method.packages/cli/src/commands/cli/upgrade.ts now imports type UpgradeSource from ../../lib/binary.js and resolveExistingUpgradeVersion plus resolveLatestUpgradeVersion from ../../lib/upgrade.js.CLI_VERSION === target unless flags.force is true or channelChanged is true; switching channels therefore still triggers upgrade processing even when the target version matches.resolveContext(version, flags) resolves channel and versionArg via resolveChannelAndVersion(version), reads the persisted channel with getReleaseChannel(), and computes channelChanged as channel !== currentChannel.sentry cli upgrade help text includes sentry cli upgrade nightly # Switch to nightly channel and update.buildNightlyChangelogSummary(commits: GitHubCommit[], fromVersion: string, toVersion: string, maxItems?: number): ChangelogSummary | null; it parses commit messages with parseCommitMessages(commits) and delegates to buildSummaryFromSections(sections, fromVersion, toVersion, maxItems).customFetch(url, { headers: getGitHubHeaders() }); fetch failures are caught, log Failed to fetch nightly commits at debug level, and return null.packages/cli/test/lib/binary.test.ts changes the expected default binary download URL from the legacy https://github.com/getsentry/cli/releases/download/…/1.0.0/… shape to https://github.com/getsentry/toolkit/releases/download/…/cli@1.0.0/….packages/cli/test/lib/binary.test.ts adds coverage for source-aware binary upgrades using getGitHubReleaseByTagUrl, resolveUpgradeSource, UPGRADE_SOURCES, and UpgradeSourceNotFoundError.packages/cli/test/lib/binary.test.ts assert that Toolkit is checked before the legacy CLI repository, that source probing can fall back across repositories, and that exhausting all sources with HTTP 404 produces an error whose name is UpgradeSourceNotFoundError.getGitHubReleaseByTagUrl("0.45.0", source) as a probe URL generator.packages/cli/test/lib/binary.test.ts adds a getAnonymousToken(UPGRADE_SOURCES[0]) test verifying the selected source’s GHCR repository is used: the token request must contain scope=repository:getsentry/toolkit:pull, and the returned token is "toolkit-token"./usr/local/bin/sentry, /usr/local/bin/sentry.download, /usr/local/bin/sentry.old, and /usr/local/bin/sentry.lock.AbortController matches: packages/cli/test/lib/upgrade.test.ts:1828; packages/cli/test/lib/sentry-client.test.ts:296; packages/cli/test/lib/scan/walker.test.ts:415, :804, and :833; packages/cli/test/lib/scan/concurrent.test.ts:78 and :144; and packages/cli/test/lib/scan/grep.test.ts:549.