bootstrap: improve fn check_version
Signed-off-by: onur-ozkan <work@onurozkan.dev>
This commit is contained in:
parent
ae4d18b2da
commit
e878100386
@ -110,7 +110,10 @@ fn check_version(config: &Config) -> Option<String> {
|
|||||||
|
|
||||||
let latest_config_id = CONFIG_CHANGE_HISTORY.last().unwrap();
|
let latest_config_id = CONFIG_CHANGE_HISTORY.last().unwrap();
|
||||||
if let Some(id) = config.change_id {
|
if let Some(id) = config.change_id {
|
||||||
if &id != latest_config_id {
|
if &id == latest_config_id {
|
||||||
|
return None;
|
||||||
|
}
|
||||||
|
|
||||||
let change_links: Vec<String> = find_recent_config_change_ids(id)
|
let change_links: Vec<String> = find_recent_config_change_ids(id)
|
||||||
.iter()
|
.iter()
|
||||||
.map(|id| format!("https://github.com/rust-lang/rust/pull/{id}"))
|
.map(|id| format!("https://github.com/rust-lang/rust/pull/{id}"))
|
||||||
@ -130,9 +133,6 @@ fn check_version(config: &Config) -> Option<String> {
|
|||||||
"update `config.toml` to use `change-id = {latest_config_id}` instead"
|
"update `config.toml` to use `change-id = {latest_config_id}` instead"
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
return None;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
msg.push_str("WARNING: The `change-id` is missing in the `config.toml`. This means that you will not be able to track the major changes made to the bootstrap configurations.\n");
|
msg.push_str("WARNING: The `change-id` is missing in the `config.toml`. This means that you will not be able to track the major changes made to the bootstrap configurations.\n");
|
||||||
msg.push_str("note: to silence this warning, ");
|
msg.push_str("note: to silence this warning, ");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user