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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ we should rename this section to "Unreleased" -->

### Breaking Changes

- Removed all `sentry-cli files ...` and `sentry-cli releases files ...` subcommands ([#2956](https://github.com/getsentry/sentry-cli/pull/2956)). These commands provided functionality for managing release files, a feature that has been deprecated in Sentry. Users still using `sentry-cli files upload` to upload source maps should migrate to `sentry-cli sourcemaps upload`.
- Removed the `sentry-cli sourcemaps explain` command ([#2947](https://github.com/getsentry/sentry-cli/pull/2947)). The command had been deprecated for some time, since Sentry now has a better in-product debugging flow for source map problems via the "Unminify Code" button, which is displayed on any JavaScript issues which could not be unminified.
- Removed support for the legacy API key authentication method ([#2935](https://github.com/getsentry/sentry-cli/pull/2935)). Sentry CLI now only supports authenticating with Auth Tokens. If you are using API key authentication via any of the following methods, you need to generate and use an [Auth Token](https://docs.sentry.io/account/auth-tokens/), instead:
- `--api-key` CLI flag
Expand Down
50 changes: 2 additions & 48 deletions src/api/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ use crate::utils::http::{self, is_absolute_url};
use crate::utils::non_empty::NonEmptySlice;
use crate::utils::progress::{ProgressBar, ProgressBarMode};
use crate::utils::retry::{get_default_backoff, DurationAsMilliseconds as _};
use crate::utils::sourcemaps::get_sourcemap_reference_from_headers;
use crate::utils::ui::{capitalize_string, make_byte_progress_bar};

use self::pagination::Pagination;
Expand Down Expand Up @@ -587,32 +586,6 @@ impl<'a> AuthenticatedApi<'a> {
}
}

/// Deletes all release files. Returns `true` if files were
/// deleted or `false` otherwise.
pub fn delete_release_files(
&self,
org: &str,
project: Option<&str>,
version: &str,
) -> ApiResult<()> {
let path = if let Some(project) = project {
format!(
"/projects/{}/{}/files/source-maps/?name={}",
PathArg(org),
PathArg(project),
PathArg(version)
)
} else {
format!(
"/organizations/{}/files/source-maps/?name={}",
PathArg(org),
PathArg(version)
)
};

self.delete(&path)?.into_result().map(|_| ())
}

/// Creates a new release.
pub fn new_release(&self, org: &str, release: &NewRelease) -> ApiResult<ReleaseInfo> {
// for single project releases use the legacy endpoint that is project bound.
Expand Down Expand Up @@ -1440,19 +1413,9 @@ fn handle_req<W: Write>(
} else if progress_bar_mode.active() {
let pb_progress = pb.clone();
#[expect(clippy::unwrap_used, reason = "legacy code")]
handle.progress_function(move |a, b, c, d| {
let (down_len, down_pos, up_len, up_pos) = (a as u64, b as u64, c as u64, d as u64);
handle.progress_function(move |a, b, _, _| {
let (down_len, down_pos) = (a as u64, b as u64);
let mut pb = pb_progress.borrow_mut();
if up_len > 0 && progress_bar_mode.request() {
if up_pos < up_len {
if pb.is_none() {
*pb = Some(make_byte_progress_bar(up_len));
}
pb.as_ref().unwrap().set_position(up_pos);
} else if pb.is_some() {
pb.take().unwrap().finish_and_clear();
}
}
if down_len > 0 && progress_bar_mode.response() {
if down_pos < down_len {
if pb.is_none() {
Expand Down Expand Up @@ -1899,17 +1862,8 @@ pub struct AuthInfo {
#[derive(Clone, Deserialize, Debug)]
pub struct Artifact {
pub id: String,
pub sha1: String,
pub name: String,
pub size: u64,
pub dist: Option<String>,
pub headers: HashMap<String, String>,
}

impl Artifact {
pub fn get_sourcemap_reference(&self) -> Option<&str> {
get_sourcemap_reference_from_headers(self.headers.iter())
}
}

/// Information for new releases
Expand Down
58 changes: 0 additions & 58 deletions src/commands/files/delete.rs

This file was deleted.

52 changes: 0 additions & 52 deletions src/commands/files/list.rs

This file was deleted.

67 changes: 0 additions & 67 deletions src/commands/files/mod.rs

This file was deleted.

Loading
Loading