sentry-cli 2.36.6__tar.gz → 2.37.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/Cargo.lock +1 -1
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/Cargo.toml +1 -1
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/PKG-INFO +1 -1
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/sentry_cli.egg-info/PKG-INFO +1 -1
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/debug_files/upload.rs +30 -40
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/react_native/xcode.rs +178 -193
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/config.rs +0 -11
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/utils/xcode.rs +1 -198
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/LICENSE +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/MANIFEST.in +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/README.md +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/build.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/pyproject.toml +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/sentry_cli.egg-info/SOURCES.txt +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/sentry_cli.egg-info/dependency_links.txt +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/sentry_cli.egg-info/top_level.txt +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/setup.cfg +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/setup.py +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/api/connection_manager.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/api/data_types/chunking/artifact.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/api/data_types/chunking/compression.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/api/data_types/chunking/dif.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/api/data_types/chunking/file_state.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/api/data_types/chunking/hash_algorithm.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/api/data_types/chunking/mod.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/api/data_types/chunking/upload/capability.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/api/data_types/chunking/upload/mod.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/api/data_types/chunking/upload/options.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/api/data_types/deploy.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/api/data_types/mod.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/api/encoding.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/api/envelopes_api.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/api/errors/api_error.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/api/errors/mod.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/api/errors/sentry_error.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/api/mod.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/api/pagination.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/bashsupport.sh +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/bash_hook.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/debug_files/bundle_jvm.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/debug_files/bundle_sources.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/debug_files/check.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/debug_files/find.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/debug_files/mod.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/debug_files/print_sources.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/deploys/list.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/deploys/mod.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/deploys/new.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/derive_parser.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/events/list.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/events/mod.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/files/delete.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/files/list.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/files/mod.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/files/upload.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/info.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/issues/list.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/issues/mod.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/issues/mute.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/issues/resolve.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/issues/unresolve.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/login.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/mod.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/monitors/list.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/monitors/mod.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/monitors/run.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/organizations/list.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/organizations/mod.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/projects/list.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/projects/mod.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/react_native/appcenter.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/react_native/gradle.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/react_native/mod.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/releases/archive.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/releases/delete.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/releases/finalize.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/releases/info.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/releases/list.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/releases/mod.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/releases/new.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/releases/propose_version.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/releases/restore.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/releases/set_commits.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/repos/list.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/repos/mod.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/send_envelope.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/send_event.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/send_metric/common_args.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/send_metric/distribution.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/send_metric/gauge.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/send_metric/increment.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/send_metric/mod.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/send_metric/set.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/sourcemaps/explain.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/sourcemaps/inject.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/sourcemaps/mod.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/sourcemaps/resolve.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/sourcemaps/upload.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/uninstall.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/update.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/upload_dif.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/upload_dsym.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/commands/upload_proguard.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/constants.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/main.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/utils/android.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/utils/appcenter.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/utils/args.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/utils/auth_token/auth_token_impl.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/utils/auth_token/error.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/utils/auth_token/mod.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/utils/auth_token/org_auth_token.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/utils/auth_token/redacting.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/utils/auth_token/test.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/utils/auth_token/user_auth_token.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/utils/chunks.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/utils/cordova.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/utils/dif.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/utils/dif_upload.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/utils/event.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/utils/file_search.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/utils/file_upload.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/utils/formatting.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/utils/fs.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/utils/http.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/utils/logging.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/utils/metrics.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/utils/mod.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/utils/progress.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/utils/releases.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/utils/retry.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/utils/snapshots/sentry_cli__utils__vcs__generate_patch_default_twenty.snap +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/utils/snapshots/sentry_cli__utils__vcs__generate_patch_ignore_missing.snap +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/utils/snapshots/sentry_cli__utils__vcs__generate_patch_set_base.snap +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/utils/snapshots/sentry_cli__utils__vcs__generate_patch_set_previous_commit.snap +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/utils/snapshots/sentry_cli__utils__vcs__get_commits_from_git.snap +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/utils/sourcemaps/inject.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/utils/sourcemaps.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/utils/system.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/utils/ui.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/utils/update.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/utils/value_parsers.rs +0 -0
- {sentry_cli-2.36.6 → sentry_cli-2.37.0}/src/utils/vcs.rs +0 -0
|
@@ -16,7 +16,7 @@ use crate::utils::args::ArgExt;
|
|
|
16
16
|
use crate::utils::dif::{DifType, ObjectDifFeatures};
|
|
17
17
|
use crate::utils::dif_upload::{DifFormat, DifUpload};
|
|
18
18
|
use crate::utils::system::QuietExit;
|
|
19
|
-
use crate::utils::xcode::
|
|
19
|
+
use crate::utils::xcode::InfoPlist;
|
|
20
20
|
|
|
21
21
|
static DERIVED_DATA_FOLDER: &str = "Library/Developer/Xcode/DerivedData";
|
|
22
22
|
|
|
@@ -152,15 +152,12 @@ pub fn make_command(command: Command) -> Command {
|
|
|
152
152
|
)
|
|
153
153
|
.arg(
|
|
154
154
|
Arg::new("force_foreground")
|
|
155
|
+
.hide(true)
|
|
155
156
|
.long("force-foreground")
|
|
156
157
|
.action(ArgAction::SetTrue)
|
|
157
158
|
.help(
|
|
158
|
-
"
|
|
159
|
-
|
|
160
|
-
background when triggered from Xcode. When an error happens, \
|
|
161
|
-
a dialog is shown. If this parameter is passed Xcode will wait \
|
|
162
|
-
for the process to finish before the build finishes and output \
|
|
163
|
-
will be shown in the Xcode build output.",
|
|
159
|
+
"DEPRECATED: Foreground uploads are now the default behavior.{n}\
|
|
160
|
+
This flag has no effect and will be removed in a future version.",
|
|
164
161
|
),
|
|
165
162
|
)
|
|
166
163
|
.arg(
|
|
@@ -306,45 +303,38 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
|
|
|
306
303
|
return Ok(());
|
|
307
304
|
}
|
|
308
305
|
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
if !matches.get_flag("force_foreground") {
|
|
312
|
-
handle.may_detach()?;
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
// Execute the upload
|
|
316
|
-
let (uploaded, has_processing_errors) = upload.upload()?;
|
|
317
|
-
|
|
318
|
-
// Did we miss explicitly requested symbols?
|
|
319
|
-
if matches.get_flag("require_all") {
|
|
320
|
-
let required_ids: BTreeSet<DebugId> = matches
|
|
321
|
-
.get_many::<DebugId>("ids")
|
|
322
|
-
.unwrap_or_default()
|
|
323
|
-
.cloned()
|
|
324
|
-
.collect();
|
|
306
|
+
// Execute the upload
|
|
307
|
+
let (uploaded, has_processing_errors) = upload.upload()?;
|
|
325
308
|
|
|
326
|
-
|
|
327
|
-
|
|
309
|
+
// Did we miss explicitly requested symbols?
|
|
310
|
+
if matches.get_flag("require_all") {
|
|
311
|
+
let required_ids: BTreeSet<DebugId> = matches
|
|
312
|
+
.get_many::<DebugId>("ids")
|
|
313
|
+
.unwrap_or_default()
|
|
314
|
+
.cloned()
|
|
315
|
+
.collect();
|
|
328
316
|
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
eprintln!("{}", style("Error: Some symbols could not be found!").red());
|
|
332
|
-
eprintln!("The following symbols are still missing:");
|
|
333
|
-
for id in missing_ids {
|
|
334
|
-
println!(" {id}");
|
|
335
|
-
}
|
|
317
|
+
let found_ids = uploaded.into_iter().map(|dif| dif.id()).collect();
|
|
318
|
+
let missing_ids: Vec<_> = required_ids.difference(&found_ids).collect();
|
|
336
319
|
|
|
337
|
-
|
|
320
|
+
if !missing_ids.is_empty() {
|
|
321
|
+
eprintln!();
|
|
322
|
+
eprintln!("{}", style("Error: Some symbols could not be found!").red());
|
|
323
|
+
eprintln!("The following symbols are still missing:");
|
|
324
|
+
for id in missing_ids {
|
|
325
|
+
println!(" {id}");
|
|
338
326
|
}
|
|
339
|
-
}
|
|
340
327
|
|
|
341
|
-
// report a non 0 status code if the server encountered issues.
|
|
342
|
-
if has_processing_errors {
|
|
343
|
-
eprintln!();
|
|
344
|
-
eprintln!("{}", style("Error: some symbols did not process correctly"));
|
|
345
328
|
return Err(QuietExit(1).into());
|
|
346
329
|
}
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
// report a non 0 status code if the server encountered issues.
|
|
333
|
+
if has_processing_errors {
|
|
334
|
+
eprintln!();
|
|
335
|
+
eprintln!("{}", style("Error: some symbols did not process correctly"));
|
|
336
|
+
return Err(QuietExit(1).into());
|
|
337
|
+
}
|
|
347
338
|
|
|
348
|
-
|
|
349
|
-
})
|
|
339
|
+
Ok(())
|
|
350
340
|
}
|
|
@@ -22,7 +22,7 @@ use crate::utils::file_upload::UploadContext;
|
|
|
22
22
|
use crate::utils::fs::TempFile;
|
|
23
23
|
use crate::utils::sourcemaps::SourceMapProcessor;
|
|
24
24
|
use crate::utils::system::propagate_exit_status;
|
|
25
|
-
use crate::utils::xcode::
|
|
25
|
+
use crate::utils::xcode::InfoPlist;
|
|
26
26
|
|
|
27
27
|
#[derive(Serialize, Deserialize, Default, Debug)]
|
|
28
28
|
struct SourceMapReport {
|
|
@@ -207,197 +207,197 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
|
|
|
207
207
|
let hermesc = find_hermesc();
|
|
208
208
|
info!("Using hermesc interpreter '{}'", &hermesc);
|
|
209
209
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
// wait up to 10 seconds for the server to be up.
|
|
235
|
-
if !api.wait_until_available(url, Duration::seconds(10))? {
|
|
236
|
-
bail!("Error: react-native packager did not respond in time");
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
api.download(
|
|
240
|
-
&format!("{url}/index.ios.bundle?platform=ios&dev=true"),
|
|
241
|
-
&mut bundle_file.open()?,
|
|
242
|
-
)?;
|
|
243
|
-
api.download(
|
|
244
|
-
&format!("{url}/index.ios.map?platform=ios&dev=true"),
|
|
245
|
-
&mut sourcemap_file.open()?,
|
|
246
|
-
)?;
|
|
247
|
-
|
|
248
|
-
// This is the case where we need to hook into the release process to
|
|
249
|
-
// collect sourcemaps when they are generated.
|
|
250
|
-
//
|
|
251
|
-
// this invokes via an indirection of sentry-cli our wrap_call() below.
|
|
252
|
-
// What is happening behind the scenes is that we switch out NODE_BINARY
|
|
253
|
-
// for ourselves which is what the react-native build script normally
|
|
254
|
-
// invokes. Because we export __SENTRY_RN_WRAP_XCODE_CALL=1, the main
|
|
255
|
-
// sentry-cli script will invoke our wrap_call() function below.
|
|
256
|
-
//
|
|
257
|
-
// That will then attempt to figure out that a react-native bundle is
|
|
258
|
-
// happening to the build script, parse out the arguments, add additional
|
|
259
|
-
// arguments if needed and then report the parsed arguments to a temporary
|
|
260
|
-
// JSON file we load back below.
|
|
261
|
-
//
|
|
262
|
-
// We do the same for Hermes Compiler to retrieve the bundle file and
|
|
263
|
-
// the same for the combine source maps for the final Hermes source map.
|
|
264
|
-
//
|
|
265
|
-
// With that we we then have all the information we need to invoke the
|
|
266
|
-
// upload process.
|
|
267
|
-
} else {
|
|
268
|
-
let mut command = process::Command::new(&script);
|
|
269
|
-
command
|
|
270
|
-
.env("NODE_BINARY", env::current_exe()?.to_str().unwrap())
|
|
271
|
-
.env("SENTRY_RN_REAL_NODE_BINARY", &node)
|
|
272
|
-
.env(
|
|
273
|
-
"SENTRY_RN_SOURCEMAP_REPORT",
|
|
274
|
-
report_file.path().to_str().unwrap(),
|
|
275
|
-
)
|
|
276
|
-
.env("__SENTRY_RN_WRAP_XCODE_CALL", "1");
|
|
277
|
-
|
|
278
|
-
if is_hermes_enabled(&hermesc) {
|
|
279
|
-
command
|
|
280
|
-
.env("HERMES_CLI_PATH", env::current_exe()?.to_str().unwrap())
|
|
281
|
-
.env("SENTRY_RN_REAL_HERMES_CLI_PATH", &hermesc);
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
let rv = command.spawn()?.wait()?;
|
|
285
|
-
propagate_exit_status(rv);
|
|
286
|
-
|
|
287
|
-
if !matches.get_flag("force_foreground") {
|
|
288
|
-
md.may_detach()?;
|
|
289
|
-
}
|
|
290
|
-
let mut f = fs::File::open(report_file.path())?;
|
|
291
|
-
let report: SourceMapReport = serde_json::from_reader(&mut f).unwrap_or_else(|_| {
|
|
292
|
-
let format_err = format!(
|
|
293
|
-
"File {} doesn't contain a valid JSON data.",
|
|
294
|
-
report_file.path().display()
|
|
295
|
-
);
|
|
296
|
-
panic!("{}", format_err);
|
|
297
|
-
});
|
|
298
|
-
let (Some(packager_bundle_path), Some(packager_sourcemap_path)) =
|
|
299
|
-
(report.packager_bundle_path, report.packager_sourcemap_path)
|
|
300
|
-
else {
|
|
301
|
-
println!("Warning: build produced no packager sourcemaps.");
|
|
302
|
-
return Ok(());
|
|
303
|
-
};
|
|
304
|
-
|
|
305
|
-
// If Hermes emitted source map we have to use it
|
|
306
|
-
if let (Some(hermes_bundle_path), Some(hermes_sourcemap_path)) =
|
|
307
|
-
(report.hermes_bundle_path, report.hermes_sourcemap_path)
|
|
308
|
-
{
|
|
309
|
-
bundle_path = hermes_bundle_path.clone();
|
|
310
|
-
sourcemap_path = hermes_sourcemap_path.clone();
|
|
311
|
-
println!("Using Hermes bundle and combined source map.");
|
|
312
|
-
|
|
313
|
-
// If Hermes emitted only bundle or Hermes was disabled use packager bundle and source map
|
|
314
|
-
} else {
|
|
315
|
-
bundle_path = packager_bundle_path;
|
|
316
|
-
sourcemap_path = packager_sourcemap_path;
|
|
317
|
-
println!("Using React Native Packager bundle and source map.");
|
|
318
|
-
}
|
|
319
|
-
bundle_url = format!("~/{}", bundle_path.file_name().unwrap().to_string_lossy());
|
|
320
|
-
sourcemap_url = format!(
|
|
321
|
-
"~/{}",
|
|
322
|
-
sourcemap_path.file_name().unwrap().to_string_lossy()
|
|
323
|
-
);
|
|
210
|
+
let bundle_path;
|
|
211
|
+
let sourcemap_path;
|
|
212
|
+
let bundle_url;
|
|
213
|
+
let sourcemap_url;
|
|
214
|
+
let bundle_file;
|
|
215
|
+
let sourcemap_file;
|
|
216
|
+
|
|
217
|
+
// If we have a fetch URL we need to fetch them from there now. In that
|
|
218
|
+
// case we do indeed fetch it right from the running packager and then
|
|
219
|
+
// store it in temporary files for later consumption.
|
|
220
|
+
if let Some(url) = fetch_url {
|
|
221
|
+
let api = Api::current();
|
|
222
|
+
let url = url.trim_end_matches('/');
|
|
223
|
+
bundle_file = TempFile::create()?;
|
|
224
|
+
bundle_path = bundle_file.path().to_path_buf();
|
|
225
|
+
bundle_url = "~/index.ios.bundle".to_string();
|
|
226
|
+
sourcemap_file = TempFile::create()?;
|
|
227
|
+
sourcemap_path = sourcemap_file.path().to_path_buf();
|
|
228
|
+
sourcemap_url = "~/index.ios.map".to_string();
|
|
229
|
+
|
|
230
|
+
// wait up to 10 seconds for the server to be up.
|
|
231
|
+
if !api.wait_until_available(url, Duration::seconds(10))? {
|
|
232
|
+
bail!("Error: react-native packager did not respond in time");
|
|
324
233
|
}
|
|
325
234
|
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
processor.add(&bundle_url, ReleaseFileSearch::collect_file(bundle_path)?)?;
|
|
334
|
-
processor.add(
|
|
335
|
-
&sourcemap_url,
|
|
336
|
-
ReleaseFileSearch::collect_file(sourcemap_path)?,
|
|
235
|
+
api.download(
|
|
236
|
+
&format!("{url}/index.ios.bundle?platform=ios&dev=true"),
|
|
237
|
+
&mut bundle_file.open()?,
|
|
238
|
+
)?;
|
|
239
|
+
api.download(
|
|
240
|
+
&format!("{url}/index.ios.map?platform=ios&dev=true"),
|
|
241
|
+
&mut sourcemap_file.open()?,
|
|
337
242
|
)?;
|
|
338
|
-
processor.rewrite(&[base.parent().unwrap().to_str().unwrap()])?;
|
|
339
|
-
processor.add_sourcemap_references()?;
|
|
340
|
-
processor.add_debug_id_references()?;
|
|
341
243
|
|
|
342
|
-
|
|
343
|
-
|
|
244
|
+
// This is the case where we need to hook into the release process to
|
|
245
|
+
// collect sourcemaps when they are generated.
|
|
246
|
+
//
|
|
247
|
+
// this invokes via an indirection of sentry-cli our wrap_call() below.
|
|
248
|
+
// What is happening behind the scenes is that we switch out NODE_BINARY
|
|
249
|
+
// for ourselves which is what the react-native build script normally
|
|
250
|
+
// invokes. Because we export __SENTRY_RN_WRAP_XCODE_CALL=1, the main
|
|
251
|
+
// sentry-cli script will invoke our wrap_call() function below.
|
|
252
|
+
//
|
|
253
|
+
// That will then attempt to figure out that a react-native bundle is
|
|
254
|
+
// happening to the build script, parse out the arguments, add additional
|
|
255
|
+
// arguments if needed and then report the parsed arguments to a temporary
|
|
256
|
+
// JSON file we load back below.
|
|
257
|
+
//
|
|
258
|
+
// We do the same for Hermes Compiler to retrieve the bundle file and
|
|
259
|
+
// the same for the combine source maps for the final Hermes source map.
|
|
260
|
+
//
|
|
261
|
+
// With that we we then have all the information we need to invoke the
|
|
262
|
+
// upload process.
|
|
263
|
+
} else {
|
|
264
|
+
let mut command = process::Command::new(&script);
|
|
265
|
+
command
|
|
266
|
+
.env("NODE_BINARY", env::current_exe()?.to_str().unwrap())
|
|
267
|
+
.env("SENTRY_RN_REAL_NODE_BINARY", &node)
|
|
268
|
+
.env(
|
|
269
|
+
"SENTRY_RN_SOURCEMAP_REPORT",
|
|
270
|
+
report_file.path().to_str().unwrap(),
|
|
271
|
+
)
|
|
272
|
+
.env("__SENTRY_RN_WRAP_XCODE_CALL", "1");
|
|
273
|
+
|
|
274
|
+
if is_hermes_enabled(&hermesc) {
|
|
275
|
+
command
|
|
276
|
+
.env("HERMES_CLI_PATH", env::current_exe()?.to_str().unwrap())
|
|
277
|
+
.env("SENTRY_RN_REAL_HERMES_CLI_PATH", &hermesc);
|
|
278
|
+
}
|
|
344
279
|
|
|
345
|
-
let
|
|
346
|
-
|
|
280
|
+
let rv = command.spawn()?.wait()?;
|
|
281
|
+
propagate_exit_status(rv);
|
|
347
282
|
|
|
348
|
-
let
|
|
349
|
-
let
|
|
350
|
-
|
|
283
|
+
let mut f = fs::File::open(report_file.path())?;
|
|
284
|
+
let report: SourceMapReport = serde_json::from_reader(&mut f).unwrap_or_else(|_| {
|
|
285
|
+
let format_err = format!(
|
|
286
|
+
"File {} doesn't contain a valid JSON data.",
|
|
287
|
+
report_file.path().display()
|
|
288
|
+
);
|
|
289
|
+
panic!("{}", format_err);
|
|
290
|
+
});
|
|
291
|
+
let (Some(packager_bundle_path), Some(packager_sourcemap_path)) =
|
|
292
|
+
(report.packager_bundle_path, report.packager_sourcemap_path)
|
|
293
|
+
else {
|
|
294
|
+
println!("Warning: build produced no packager sourcemaps.");
|
|
295
|
+
return Ok(());
|
|
296
|
+
};
|
|
351
297
|
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
298
|
+
// If Hermes emitted source map we have to use it
|
|
299
|
+
if let (Some(hermes_bundle_path), Some(hermes_sourcemap_path)) =
|
|
300
|
+
(report.hermes_bundle_path, report.hermes_sourcemap_path)
|
|
355
301
|
{
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
note: None,
|
|
362
|
-
wait,
|
|
363
|
-
max_wait,
|
|
364
|
-
dedupe: false,
|
|
365
|
-
chunk_upload_options: chunk_upload_options.as_ref(),
|
|
366
|
-
})?;
|
|
302
|
+
bundle_path = hermes_bundle_path.clone();
|
|
303
|
+
sourcemap_path = hermes_sourcemap_path.clone();
|
|
304
|
+
println!("Using Hermes bundle and combined source map.");
|
|
305
|
+
|
|
306
|
+
// If Hermes emitted only bundle or Hermes was disabled use packager bundle and source map
|
|
367
307
|
} else {
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
308
|
+
bundle_path = packager_bundle_path;
|
|
309
|
+
sourcemap_path = packager_sourcemap_path;
|
|
310
|
+
println!("Using React Native Packager bundle and source map.");
|
|
311
|
+
}
|
|
312
|
+
bundle_url = format!("~/{}", bundle_path.file_name().unwrap().to_string_lossy());
|
|
313
|
+
sourcemap_url = format!(
|
|
314
|
+
"~/{}",
|
|
315
|
+
sourcemap_path.file_name().unwrap().to_string_lossy()
|
|
316
|
+
);
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
// now that we have all the data, we can now process and upload the
|
|
320
|
+
// sourcemaps.
|
|
321
|
+
println!("Processing react-native sourcemaps for Sentry upload.");
|
|
322
|
+
info!(" bundle path: {}", bundle_path.display());
|
|
323
|
+
info!(" sourcemap path: {}", sourcemap_path.display());
|
|
324
|
+
|
|
325
|
+
let mut processor = SourceMapProcessor::new();
|
|
326
|
+
processor.add(&bundle_url, ReleaseFileSearch::collect_file(bundle_path)?)?;
|
|
327
|
+
processor.add(
|
|
328
|
+
&sourcemap_url,
|
|
329
|
+
ReleaseFileSearch::collect_file(sourcemap_path)?,
|
|
330
|
+
)?;
|
|
331
|
+
processor.rewrite(&[base.parent().unwrap().to_str().unwrap()])?;
|
|
332
|
+
processor.add_sourcemap_references()?;
|
|
333
|
+
processor.add_debug_id_references()?;
|
|
334
|
+
|
|
335
|
+
let api = Api::current();
|
|
336
|
+
let chunk_upload_options = api.authenticated()?.get_chunk_upload_options(&org)?;
|
|
337
|
+
|
|
338
|
+
let dist_from_env = env::var("SENTRY_DIST");
|
|
339
|
+
let release_from_env = env::var("SENTRY_RELEASE");
|
|
340
|
+
|
|
341
|
+
let wait_for_secs = matches.get_one::<u64>("wait_for").copied();
|
|
342
|
+
let wait = matches.get_flag("wait") || wait_for_secs.is_some();
|
|
343
|
+
let max_wait = wait_for_secs.map_or(DEFAULT_MAX_WAIT, std::time::Duration::from_secs);
|
|
344
|
+
|
|
345
|
+
if dist_from_env.is_err() && release_from_env.is_err() && matches.get_flag("no_auto_release") {
|
|
346
|
+
processor.upload(&UploadContext {
|
|
347
|
+
org: &org,
|
|
348
|
+
project: Some(&project),
|
|
349
|
+
release: None,
|
|
350
|
+
dist: None,
|
|
351
|
+
note: None,
|
|
352
|
+
wait,
|
|
353
|
+
max_wait,
|
|
354
|
+
dedupe: false,
|
|
355
|
+
chunk_upload_options: chunk_upload_options.as_ref(),
|
|
356
|
+
})?;
|
|
357
|
+
} else {
|
|
358
|
+
let (dist, release_name) = match (&dist_from_env, &release_from_env) {
|
|
359
|
+
(Err(_), Err(_)) => {
|
|
360
|
+
// Neither environment variable is present, attempt to parse Info.plist
|
|
361
|
+
info!("Parsing Info.plist");
|
|
362
|
+
match InfoPlist::discover_from_env() {
|
|
363
|
+
Ok(Some(plist)) => {
|
|
364
|
+
// Successfully discovered and parsed Info.plist
|
|
365
|
+
let dist_string = plist.build().to_string();
|
|
366
|
+
let release_string =
|
|
367
|
+
format!("{}@{}+{}", plist.bundle_id(), plist.version(), dist_string);
|
|
368
|
+
info!("Parse result from Info.plist: {:?}", &plist);
|
|
369
|
+
(Some(dist_string), Some(release_string))
|
|
370
|
+
}
|
|
371
|
+
_ => {
|
|
372
|
+
bail!("Info.plist was not found or an parsing error occurred");
|
|
388
373
|
}
|
|
389
374
|
}
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
375
|
+
}
|
|
376
|
+
// At least one environment variable is present, use the values from the environment
|
|
377
|
+
_ => (dist_from_env.ok(), release_from_env.ok()),
|
|
378
|
+
};
|
|
393
379
|
|
|
394
|
-
|
|
395
|
-
|
|
380
|
+
match matches.get_many::<String>("dist") {
|
|
381
|
+
None => {
|
|
382
|
+
processor.upload(&UploadContext {
|
|
383
|
+
org: &org,
|
|
384
|
+
project: Some(&project),
|
|
385
|
+
release: release_name.as_deref(),
|
|
386
|
+
dist: dist.as_deref(),
|
|
387
|
+
note: None,
|
|
388
|
+
wait,
|
|
389
|
+
max_wait,
|
|
390
|
+
dedupe: false,
|
|
391
|
+
chunk_upload_options: chunk_upload_options.as_ref(),
|
|
392
|
+
})?;
|
|
393
|
+
}
|
|
394
|
+
Some(dists) => {
|
|
395
|
+
for dist in dists {
|
|
396
396
|
processor.upload(&UploadContext {
|
|
397
397
|
org: &org,
|
|
398
398
|
project: Some(&project),
|
|
399
399
|
release: release_name.as_deref(),
|
|
400
|
-
dist: dist
|
|
400
|
+
dist: Some(dist),
|
|
401
401
|
note: None,
|
|
402
402
|
wait,
|
|
403
403
|
max_wait,
|
|
@@ -405,26 +405,11 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
|
|
|
405
405
|
chunk_upload_options: chunk_upload_options.as_ref(),
|
|
406
406
|
})?;
|
|
407
407
|
}
|
|
408
|
-
Some(dists) => {
|
|
409
|
-
for dist in dists {
|
|
410
|
-
processor.upload(&UploadContext {
|
|
411
|
-
org: &org,
|
|
412
|
-
project: Some(&project),
|
|
413
|
-
release: release_name.as_deref(),
|
|
414
|
-
dist: Some(dist),
|
|
415
|
-
note: None,
|
|
416
|
-
wait,
|
|
417
|
-
max_wait,
|
|
418
|
-
dedupe: false,
|
|
419
|
-
chunk_upload_options: chunk_upload_options.as_ref(),
|
|
420
|
-
})?;
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
408
|
}
|
|
424
409
|
}
|
|
410
|
+
}
|
|
425
411
|
|
|
426
|
-
|
|
427
|
-
})
|
|
412
|
+
Ok(())
|
|
428
413
|
}
|
|
429
414
|
|
|
430
415
|
pub fn wrap_call() -> Result<()> {
|
|
@@ -439,17 +439,6 @@ impl Config {
|
|
|
439
439
|
)
|
|
440
440
|
}
|
|
441
441
|
|
|
442
|
-
/// Returns true if notifications should be displayed.
|
|
443
|
-
/// We only use this function in the macOS binary.
|
|
444
|
-
#[cfg(target_os = "macos")]
|
|
445
|
-
pub fn show_notifications(&self) -> Result<bool> {
|
|
446
|
-
Ok(self
|
|
447
|
-
.ini
|
|
448
|
-
.get_from(Some("ui"), "show_notifications")
|
|
449
|
-
.map(|x| x == "true")
|
|
450
|
-
.unwrap_or(true))
|
|
451
|
-
}
|
|
452
|
-
|
|
453
442
|
/// Returns the maximum DIF upload size
|
|
454
443
|
pub fn get_max_dif_archive_size(&self) -> u64 {
|
|
455
444
|
let key = "max_upload_size";
|