xtask: Fix release changelog generation

The version title might exist after the "unreleased" title if the
release failed after the changelog was updated
This commit is contained in:
Kévin Commaille 2022-06-03 12:08:56 +02:00 committed by Kévin Commaille
parent d37a9316bc
commit 93d8401d35

View File

@ -96,7 +96,7 @@ impl Package {
..self.version.clone()
};
let update = if changelog.starts_with(&format!("# {version}\n")) {
let update = if changelog.contains(&format!("# {version}\n")) {
false
} else if changelog.starts_with(&format!("# {version} (unreleased)\n"))
|| changelog.starts_with("# [unreleased]\n")