Skip to content

Commit

Permalink
Fix Cargo tagging & version parsing
Browse files Browse the repository at this point in the history
This modifies the code to correctly load the split cargo version into
"current_cargo_version" and the split rustc version. This should fix our
Cargo tagging support.
  • Loading branch information
Mark-Simulacrum committed Oct 9, 2023
1 parent fb8c06a commit 19ed30b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,12 +309,12 @@ impl Context {

let current = self.load_version(|filename| filename.starts_with("rustc-"))?;
println!("current version: {}", current);
let current_version = current.split(' ').next().unwrap();
self.current_version = Some(current_version.to_string());
let current_rustc = current.split(' ').next().unwrap();
self.current_version = Some(current_rustc.to_string());

let current_cargo = self.load_version(|filename| filename.starts_with("cargo-"))?;
println!("current cargo version: {}", current_cargo);
let current_version = current_cargo.split(' ').next().unwrap();
let current_cargo = current_cargo.split(' ').next().unwrap();
self.current_cargo_version = Some(current_cargo.to_string());

// The release process for beta looks like so:
Expand All @@ -336,7 +336,7 @@ impl Context {
);
}

Ok(prev_version == current_version)
Ok(prev_version == current_rustc)
}

/// Make sure this release comes with a minimum of components.
Expand Down

0 comments on commit 19ed30b

Please sign in to comment.