Skip to content

Commit c19415f

Browse files
committed
Be more lenient when looking up resources package
1 parent 1227131 commit c19415f

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

xtask/src/artifacts.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,10 @@ pub fn download(commit_hash: Option<String>, url: Option<String>) -> anyhow::Res
8484

8585
let specs_url = project
8686
.packages
87-
.get(&format!("rest-resources-zip-{}.zip", *STACK_VERSION))
87+
.iter()
88+
.find(|(name, _)| name.starts_with("rest-resources-zip-"))
8889
.with_context(|| "Package 'rest-resources-zip' not found")?
90+
.1
8991
.url
9092
.clone();
9193

yaml_test_runner/src/main.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,13 @@ fn main() -> anyhow::Result<()> {
7676

7777
let stack_version = std::env::var("STACK_VERSION").expect("Missing STACK_VERSION env var");
7878

79-
if version != stack_version {
79+
let valid_version = if let Some(pos) = stack_version.find(".x-SNAPSHOT") {
80+
&version[0..pos] == &stack_version[0..pos] && version.ends_with("-SNAPSHOT")
81+
} else {
82+
version != stack_version
83+
};
84+
85+
if !valid_version {
8086
bail!(
8187
"ES server version {} is inconsistent with STACK_VERSION={}",
8288
version,

0 commit comments

Comments
 (0)