Skip to content

Commit b6d72df

Browse files
chore(proguard): Deprecate release association flags (#2852)
### Description Proguard Release Association is a thing of the past. Here, we deprecate the flags for setting the relationship. ### Issues - Resolves #2849 - Resolves CLI-191
1 parent 8ad27a9 commit b6d72df

File tree

3 files changed

+57
-45
lines changed

3 files changed

+57
-45
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
### Deprecations
88

9+
- Deprecated the `upload-proguard` subcommand's `--app-id`, `--version`, and `--version-code` flags ([#2852](https://github.com/getsentry/sentry-cli/pull/2852)), as we plan to remove these flags in Sentry CLI 3.x. Users should simply stop using the flags; the values specified there have never had an effect on deobfuscation, and are no longer visible in Sentry.
910
- Added a deprecation notice for release bundle uploads, a legacy method for uploading sourcemaps ([#2844](https://github.com/getsentry/sentry-cli/pull/2844)). Release bundle uploads will be removed in Sentry CLI 3.x in favor of artifact bundles, the newer sourcemap upload method [introduced in Sentry version 23.6.2](https://github.com/getsentry/sentry/commit/f90f764fda09575f3f94caf32d04589098384616). **Self-hosted users**: You must upgrade to Sentry 23.6.2 or later before upgrading to Sentry CLI 3.x.
1011

1112
## 2.56.1

src/commands/upload_proguard.rs

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,36 +35,52 @@ pub fn make_command(command: Command) -> Command {
3535
)
3636
.arg(
3737
Arg::new("version")
38+
.hide(true)
3839
.long("version")
3940
.value_name("VERSION")
4041
.requires("app_id")
4142
.help(
42-
"Optionally associate the mapping files with a human \
43-
readable version.{n}This helps you understand which \
44-
ProGuard files go with which version of your app.",
43+
"[DEPRECATED] Optionally associate the mapping files \
44+
with a human readable version.{n}This helps you \
45+
understand which ProGuard files go with which version \
46+
of your app.\n\
47+
Sentry SaaS and self-hosted version 25.9.0 and later no \
48+
longer display this association, as it has no effect on \
49+
deobfuscation. This flag is scheduled for removal in \
50+
Sentry CLI 3.0.0.",
4551
),
4652
)
4753
.arg(
4854
Arg::new("version_code")
55+
.hide(true)
4956
.long("version-code")
5057
.value_name("VERSION_CODE")
5158
.requires("app_id")
5259
.requires("version")
5360
.help(
54-
"Optionally associate the mapping files with a version \
61+
"[DEPRECATED] Optionally associate the mapping files with a version \
5562
code.{n}This helps you understand which ProGuard files \
56-
go with which version of your app.",
63+
go with which version of your app.\n\
64+
Sentry SaaS and self-hosted version 25.9.0 and later no \
65+
longer display this association, as it has no effect on \
66+
deobfuscation. This flag is scheduled for removal in \
67+
Sentry CLI 3.0.0.",
5768
),
5869
)
5970
.arg(
6071
Arg::new("app_id")
72+
.hide(true)
6173
.long("app-id")
6274
.value_name("APP_ID")
6375
.requires("version")
6476
.help(
65-
"Optionally associate the mapping files with an application \
77+
"[DEPRECATED] Optionally associate the mapping files with an application \
6678
ID.{n}If you have multiple apps in one sentry project, you can \
67-
then easily tell them apart.",
79+
then easily tell them apart.\n\
80+
Sentry SaaS and self-hosted version 25.9.0 and later no \
81+
longer display this association, as it has no effect on \
82+
deobfuscation. This flag is scheduled for removal in \
83+
Sentry CLI 3.0.0.",
6884
),
6985
)
7086
.arg(
@@ -267,6 +283,13 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
267283

268284
// if values are given associate
269285
if let Some(app_id) = matches.get_one::<String>("app_id") {
286+
log::warn!(
287+
"[DEPRECATION NOTICE] The --app-id, --version, and --version-code flags are deprecated. \
288+
and scheduled for removal in Sentry CLI 3.0.0. \
289+
These values have no effect on deobfuscation, and are no longer displayed anywhere \
290+
in the Sentry UI (neither in SaaS nor in self-hosted versions 25.9.0 and later)."
291+
);
292+
270293
#[expect(clippy::unwrap_used, reason = "legacy code")]
271294
let version = matches.get_one::<String>("version").unwrap().to_owned();
272295
let build: Option<String> = matches.get_one::<String>("version_code").cloned();

tests/integration/_cases/upload_proguard/upload_proguard-help.trycmd

Lines changed: 26 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -9,43 +9,31 @@ Arguments:
99
[PATH]... The path to the mapping files.
1010

1111
Options:
12-
-o, --org <ORG> The organization ID or slug.
13-
--header <KEY:VALUE> Custom headers that should be attached to all requests
14-
in key:value format.
15-
-p, --project <PROJECT> The project ID or slug.
16-
--auth-token <AUTH_TOKEN> Use the given Sentry auth token.
17-
--version <VERSION> Optionally associate the mapping files with a human readable
18-
version.
19-
This helps you understand which ProGuard files go with which
20-
version of your app.
21-
--version-code <VERSION_CODE> Optionally associate the mapping files with a version code.
22-
This helps you understand which ProGuard files go with which
23-
version of your app.
24-
--app-id <APP_ID> Optionally associate the mapping files with an application ID.
25-
If you have multiple apps in one sentry project, you can then
26-
easily tell them apart.
27-
--log-level <LOG_LEVEL> Set the log output verbosity. [possible values: trace, debug,
28-
info, warn, error]
29-
--platform <PLATFORM> Optionally defines the platform for the app association.
30-
[defaults to 'android']
31-
--quiet Do not print any output while preserving correct exit code.
32-
This flag is currently implemented only for selected
33-
subcommands. [aliases: --silent]
34-
--no-upload Disable the actual upload.
35-
This runs all steps for the processing but does not trigger the
36-
upload. This is useful if you just want to verify the mapping
37-
files and write the proguard UUIDs into a properties file.
38-
--write-properties <PATH> Write the UUIDs for the processed mapping files into the given
39-
properties file.
40-
--require-one Requires at least one file to upload or the command will error.
41-
-u, --uuid <UUID> Explicitly override the UUID of the mapping file with another
42-
one.
43-
This should be used with caution as it means that you can
44-
upload multiple mapping files if you don't take care. This
45-
however can be useful if you have a build process in which you
46-
need to know the UUID of the proguard file before it was
47-
created. If you upload a file with a forced UUID you can only
48-
upload a single proguard file.
49-
-h, --help Print help
12+
-o, --org <ORG> The organization ID or slug.
13+
--header <KEY:VALUE> Custom headers that should be attached to all requests
14+
in key:value format.
15+
-p, --project <PROJECT> The project ID or slug.
16+
--auth-token <AUTH_TOKEN> Use the given Sentry auth token.
17+
--log-level <LOG_LEVEL> Set the log output verbosity. [possible values: trace, debug, info,
18+
warn, error]
19+
--platform <PLATFORM> Optionally defines the platform for the app association. [defaults
20+
to 'android']
21+
--quiet Do not print any output while preserving correct exit code. This
22+
flag is currently implemented only for selected subcommands.
23+
[aliases: --silent]
24+
--no-upload Disable the actual upload.
25+
This runs all steps for the processing but does not trigger the
26+
upload. This is useful if you just want to verify the mapping
27+
files and write the proguard UUIDs into a properties file.
28+
--write-properties <PATH> Write the UUIDs for the processed mapping files into the given
29+
properties file.
30+
--require-one Requires at least one file to upload or the command will error.
31+
-u, --uuid <UUID> Explicitly override the UUID of the mapping file with another one.
32+
This should be used with caution as it means that you can upload
33+
multiple mapping files if you don't take care. This however can be
34+
useful if you have a build process in which you need to know the
35+
UUID of the proguard file before it was created. If you upload a
36+
file with a forced UUID you can only upload a single proguard file.
37+
-h, --help Print help
5038

5139
```

0 commit comments

Comments
 (0)