m/cup
1
0
mirror of https://github.com/sergi0g/cup.git synced 2025-11-08 05:03:49 -05:00

fix: ignore version info when tags are equal

Even though some images had newer digests, they weren't being taken into
consideration when checking for updates. Should resolve #85 (further
testing needed to confirm).
This commit is contained in:
Sergio
2025-04-06 20:10:05 +03:00
parent 674bc3d614
commit 5904c2d2e2

View File

@@ -182,10 +182,7 @@ pub async fn get_latest_tag(
));
get_latest_digest(
&Image {
version_info: Some(VersionInfo {
latest_remote_tag: Some(t.clone()),
..image.version_info.as_ref().unwrap().clone()
}),
version_info: None, // Overwrite previous version info, since it isn't useful anymore (equal tags means up to date and an image is truly up to date when its digests are up to date, and we'll be checking those anyway)
time_ms: image.time_ms + elapsed(start),
..image.clone()
},