From 69c52b1411da50b0f9ce5f5ca6bd0ecb0a199e9d Mon Sep 17 00:00:00 2001 From: maciektr Date: Fri, 22 Mar 2024 12:25:58 +0100 Subject: [PATCH] Fix nightlies pipeline after rust package id spec update commit-id:006f3571 --- xtask/src/nightly_release_notes.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/xtask/src/nightly_release_notes.rs b/xtask/src/nightly_release_notes.rs index f41d62d51..6fdabaa05 100644 --- a/xtask/src/nightly_release_notes.rs +++ b/xtask/src/nightly_release_notes.rs @@ -28,11 +28,14 @@ pub fn main(_: Args) -> Result<()> { .unwrap() .iter() .find(|node| { - node.get("id") + let repr = node.get("id") .unwrap() .as_str() - .unwrap() - .starts_with("scarb ") + .unwrap(); + // The first condition for Rust >= 1.77 + // (After the PackageId spec stabilization) + // The second condition for Rust < 1.77 + repr.contains("scarb#") || repr.starts_with("scarb ") }) .unwrap() .get("deps")