Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
6 changes: 1 addition & 5 deletions src/commands/debug_files/upload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {

upload.include_sources(matches.get_flag("include_sources"));
upload.il2cpp_mapping(matches.get_flag("il2cpp_mapping"));
upload.no_upload(matches.get_flag("no_upload"));

// Configure BCSymbolMap resolution, if possible
if let Some(symbol_map) = matches.get_one::<String>("symbol_maps") {
Expand All @@ -288,11 +289,6 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
}
}

if matches.get_flag("no_upload") {
println!("{} skipping upload.", style(">").dim());
return Ok(());
}

// Execute the upload
let (uploaded, has_processing_errors) = upload.upload()?;

Expand Down
18 changes: 18 additions & 0 deletions src/utils/dif_upload/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1248,6 +1248,10 @@ fn upload_difs_chunked(
let source_bundles = create_source_bundles(&processed, options.upload_il2cpp_mappings)?;
processed.extend(source_bundles);
}
if options.no_upload {
println!("{} skipping upload.", style(">").dim());
return Ok(Default::default());
}

// Calculate checksums and chunks
let chunked = prepare_difs(processed, |m| {
Expand Down Expand Up @@ -1359,6 +1363,10 @@ fn upload_difs_batched(options: &DifUpload) -> Result<Vec<DebugInfoFile>> {
println!("{} Nothing to upload", style(">").dim());
return Ok(Default::default());
}
if options.no_upload {
println!("{} skipping upload.", style(">").dim());
return Ok(Default::default());
}

// Upload missing DIFs in batches
let uploaded = upload_in_batches(&missing, options)?;
Expand Down Expand Up @@ -1448,6 +1456,7 @@ pub struct DifUpload<'a> {
wait: bool,
upload_il2cpp_mappings: bool,
il2cpp_mappings_allowed: bool,
no_upload: bool,
}

impl<'a> DifUpload<'a> {
Expand Down Expand Up @@ -1488,6 +1497,7 @@ impl<'a> DifUpload<'a> {
wait: false,
upload_il2cpp_mappings: false,
il2cpp_mappings_allowed: false,
no_upload: false,
}
}

Expand Down Expand Up @@ -1599,6 +1609,14 @@ impl<'a> DifUpload<'a> {
self
}

/// Set whether to skip uploading the detected debug files for troubleshooting purposes.
///
/// Defaults to `false`.
pub fn no_upload(&mut self, skip: bool) -> &mut Self {
self.no_upload = skip;
self
}

/// Performs the search for DIFs and uploads them.
///
/// ```
Expand Down