xtask: Don't look for pre-release titles in changelogs
This commit is contained in:
parent
309ba18b82
commit
83e4c29603
@ -9,6 +9,7 @@ publish = false
|
|||||||
default = ["isahc", "semver", "toml_edit"]
|
default = ["isahc", "semver", "toml_edit"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
assign = "1.1.1"
|
||||||
isahc = { version = "1.2.0", features = ["json"], optional = true }
|
isahc = { version = "1.2.0", features = ["json"], optional = true }
|
||||||
semver = { version = "0.11.0", features = ["serde"], optional = true }
|
semver = { version = "0.11.0", features = ["serde"], optional = true }
|
||||||
serde = { version = "1.0.118", features = ["derive"] }
|
serde = { version = "1.0.118", features = ["derive"] }
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
|
||||||
|
use assign::assign;
|
||||||
use isahc::{HttpClient, ReadResponseExt};
|
use isahc::{HttpClient, ReadResponseExt};
|
||||||
use semver::Version;
|
use semver::Version;
|
||||||
use serde::{de::IgnoredAny, Deserialize};
|
use serde::{de::IgnoredAny, Deserialize};
|
||||||
@ -83,9 +84,10 @@ impl Package {
|
|||||||
changelog_path.set_file_name("CHANGELOG.md");
|
changelog_path.set_file_name("CHANGELOG.md");
|
||||||
|
|
||||||
let changelog = read_file(&changelog_path)?;
|
let changelog = read_file(&changelog_path)?;
|
||||||
|
let version = assign!(self.version.clone(), { pre: vec![], build: vec![] });
|
||||||
|
|
||||||
if !changelog.starts_with(&format!("# {}\n", self.version))
|
if !changelog.starts_with(&format!("# {}\n", version))
|
||||||
&& !changelog.starts_with(&format!("# {} (unreleased)\n", self.version))
|
&& !changelog.starts_with(&format!("# {} (unreleased)\n", version))
|
||||||
&& !changelog.starts_with("# [unreleased]\n")
|
&& !changelog.starts_with("# [unreleased]\n")
|
||||||
{
|
{
|
||||||
return Err("Could not find version title in changelog".into());
|
return Err("Could not find version title in changelog".into());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user