Skip to content

Commit 6fc8ede

Browse files
committed
Update naming to match upcoming backend change
1 parent e3c3255 commit 6fc8ede

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/commands/build/snapshots.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,17 @@ struct CreateSnapshotResponse {
5555
image_count: u64,
5656
}
5757

58+
// Keep in sync with https://github.com/getsentry/sentry/blob/master/src/sentry/preprod/snapshots/manifest.py
5859
#[derive(Serialize)]
5960
struct SnapshotsManifest {
6061
app_id: String,
6162
images: HashMap<String, ImageMetadata>,
6263
}
6364

65+
// Keep in sync with https://github.com/getsentry/sentry/blob/master/src/sentry/preprod/snapshots/manifest.py
6466
#[derive(Serialize)]
6567
struct ImageMetadata {
66-
file_name: String,
68+
image_file_name: String,
6769
width: u32,
6870
height: u32,
6971
}
@@ -78,15 +80,15 @@ struct ImageInfo {
7880

7981
impl ImageInfo {
8082
fn into_manifest_entry(self) -> (String, ImageMetadata) {
81-
let file_name = Path::new(&self.relative_path)
83+
let image_file_name = Path::new(&self.relative_path)
8284
.file_name()
8385
.unwrap_or_default()
8486
.to_string_lossy()
8587
.into_owned();
8688
(
8789
self.hash,
8890
ImageMetadata {
89-
file_name,
91+
image_file_name,
9092
width: self.width,
9193
height: self.height,
9294
},
@@ -241,7 +243,6 @@ fn is_image_file(path: &Path) -> bool {
241243
.unwrap_or(false)
242244
}
243245

244-
245246
fn upload_images(images: &[ImageInfo], org: &str, project: &str) -> Result<()> {
246247
let api = Api::current();
247248
let authenticated_api = api.authenticated()?;

0 commit comments

Comments
 (0)