diff --git a/src/commands/files/delete.rs b/src/commands/files/delete.rs index 68ed9ba1e2..39a393fe9f 100644 --- a/src/commands/files/delete.rs +++ b/src/commands/files/delete.rs @@ -8,7 +8,8 @@ use crate::config::Config; pub fn make_command(command: Command) -> Command { command - .about("Delete a release file.") + .about("[DEPRECATED] Delete a release file.") + .hide(true) // Backward compatibility with `releases files ` commands. .arg(Arg::new("version").long("version").hide(true)) .arg( diff --git a/src/commands/files/list.rs b/src/commands/files/list.rs index 696c6cdf80..72e98ab1b5 100644 --- a/src/commands/files/list.rs +++ b/src/commands/files/list.rs @@ -6,7 +6,8 @@ use crate::{api::Api, config::Config, utils::formatting::Table}; pub fn make_command(command: Command) -> Command { command - .about("List all release files.") + .about("[DEPRECATED] List all release files.") + .hide(true) // Backward compatibility with `releases files ` commands. .arg(Arg::new("version").long("version").hide(true)) } diff --git a/src/commands/files/mod.rs b/src/commands/files/mod.rs index f65fd372ee..cc1b93f5d5 100644 --- a/src/commands/files/mod.rs +++ b/src/commands/files/mod.rs @@ -1,5 +1,6 @@ use anyhow::Result; use clap::{ArgMatches, Command}; +use console::style; use crate::utils::args::ArgExt; @@ -25,7 +26,8 @@ pub fn make_command(mut command: Command) -> Command { } command = command - .about("Manage release artifacts.") + .about("[DEPRECATED] Manage release artifacts.") + .hide(true) .subcommand_required(true) .arg_required_else_help(true) .org_arg() @@ -42,6 +44,9 @@ pub fn make_command(mut command: Command) -> Command { } pub fn execute(matches: &ArgMatches) -> Result<()> { + eprintln!("{}", style("⚠ DEPRECATION NOTICE: This functionality will be removed in a future version of `sentry-cli`. \ + Use the `sourcemaps` command instead.").yellow()); + macro_rules! execute_subcommand { ($name:ident) => {{ if let Some(sub_matches) = diff --git a/src/commands/files/upload.rs b/src/commands/files/upload.rs index 1f0c17e2f8..8727ac72db 100644 --- a/src/commands/files/upload.rs +++ b/src/commands/files/upload.rs @@ -24,7 +24,8 @@ use crate::utils::progress::ProgressBarMode; pub fn make_command(command: Command) -> Command { command - .about("Upload files for a release.") + .about("[DEPRECATED] Upload files for a release.") + .hide(true) // Backward compatibility with `releases files ` commands. .arg(Arg::new("version").long("version").hide(true)) .arg( diff --git a/src/commands/sourcemaps/explain.rs b/src/commands/sourcemaps/explain.rs index aeeebb6b48..e57bea9e04 100644 --- a/src/commands/sourcemaps/explain.rs +++ b/src/commands/sourcemaps/explain.rs @@ -16,7 +16,8 @@ use super::resolve::print_source; pub fn make_command(command: Command) -> Command { command - .about("Explain why sourcemaps are not working for a given event.") + .about("[DEPRECATED] Explain why sourcemaps are not working for a given event.") + .hide(true) .alias("why") .arg( Arg::new("event") diff --git a/tests/integration/_cases/help/help-windows.trycmd b/tests/integration/_cases/help/help-windows.trycmd index abc5a066d4..b7eea1433f 100644 --- a/tests/integration/_cases/help/help-windows.trycmd +++ b/tests/integration/_cases/help/help-windows.trycmd @@ -14,7 +14,6 @@ Commands: debug-files Locate, analyze or upload debug information files. [aliases: dif] deploys Manage deployments for Sentry releases. events Manage events on Sentry. - files Manage release artifacts. info Print information about the configuration and verify authentication. issues Manage issues in Sentry. login Authenticate with the Sentry server. diff --git a/tests/integration/_cases/help/help.trycmd b/tests/integration/_cases/help/help.trycmd index 62e5ef0829..00a2978dd7 100644 --- a/tests/integration/_cases/help/help.trycmd +++ b/tests/integration/_cases/help/help.trycmd @@ -14,7 +14,6 @@ Commands: debug-files Locate, analyze or upload debug information files. [aliases: dif] deploys Manage deployments for Sentry releases. events Manage events on Sentry. - files Manage release artifacts. info Print information about the configuration and verify authentication. issues Manage issues in Sentry. login Authenticate with the Sentry server. diff --git a/tests/integration/_cases/releases/releases-files-upload-sourcemaps.trycmd b/tests/integration/_cases/releases/releases-files-upload-sourcemaps.trycmd index f66da7a86f..0d639cb487 100644 --- a/tests/integration/_cases/releases/releases-files-upload-sourcemaps.trycmd +++ b/tests/integration/_cases/releases/releases-files-upload-sourcemaps.trycmd @@ -1,6 +1,7 @@ ``` $ sentry-cli releases files wat-release upload-sourcemaps --url-prefix '~/assets' build/assets --rewrite ? success +⚠ DEPRECATION NOTICE: This functionality will be removed in a future version of `sentry-cli`. Use the `sourcemaps` command instead. > Rewriting sources > Adding source map references > Nothing to upload diff --git a/tests/integration/_cases/sourcemaps/sourcemaps-explain-help.trycmd b/tests/integration/_cases/sourcemaps/sourcemaps-explain-help.trycmd index 8e5e18bd04..9198b4c13b 100644 --- a/tests/integration/_cases/sourcemaps/sourcemaps-explain-help.trycmd +++ b/tests/integration/_cases/sourcemaps/sourcemaps-explain-help.trycmd @@ -1,7 +1,7 @@ ``` $ sentry-cli sourcemaps explain --help ? success -Explain why sourcemaps are not working for a given event. +[DEPRECATED] Explain why sourcemaps are not working for a given event. Usage: sentry-cli[EXE] sourcemaps explain [OPTIONS] diff --git a/tests/integration/_cases/sourcemaps/sourcemaps-help.trycmd b/tests/integration/_cases/sourcemaps/sourcemaps-help.trycmd index c8df51b64a..c6b2595f4c 100644 --- a/tests/integration/_cases/sourcemaps/sourcemaps-help.trycmd +++ b/tests/integration/_cases/sourcemaps/sourcemaps-help.trycmd @@ -6,7 +6,6 @@ Manage sourcemaps for Sentry releases. Usage: sentry-cli[EXE] sourcemaps [OPTIONS] Commands: - explain Explain why sourcemaps are not working for a given event. inject Fixes up JavaScript source files and sourcemaps with debug ids. resolve Resolve sourcemap for a given line/column position. upload Upload sourcemaps for a release. diff --git a/tests/integration/_cases/sourcemaps/sourcemaps-no-subcommand.trycmd b/tests/integration/_cases/sourcemaps/sourcemaps-no-subcommand.trycmd index b80d85b353..06a90c447a 100644 --- a/tests/integration/_cases/sourcemaps/sourcemaps-no-subcommand.trycmd +++ b/tests/integration/_cases/sourcemaps/sourcemaps-no-subcommand.trycmd @@ -6,7 +6,6 @@ Manage sourcemaps for Sentry releases. Usage: sentry-cli[EXE] sourcemaps [OPTIONS] Commands: - explain Explain why sourcemaps are not working for a given event. inject Fixes up JavaScript source files and sourcemaps with debug ids. resolve Resolve sourcemap for a given line/column position. upload Upload sourcemaps for a release.