We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 9b33872 + 0744b36 commit 70e9582Copy full SHA for 70e9582
src/tools/rust-analyzer/xtask/src/publish.rs
@@ -9,6 +9,15 @@ impl flags::PublishReleaseNotes {
9
pub(crate) fn run(self, sh: &Shell) -> anyhow::Result<()> {
10
let asciidoc = sh.read_file(&self.changelog)?;
11
let mut markdown = notes::convert_asciidoc_to_markdown(std::io::Cursor::new(&asciidoc))?;
12
+ if !markdown.starts_with("# Changelog") {
13
+ bail!("changelog Markdown should start with `# Changelog`");
14
+ }
15
+ const NEWLINES: &str = "\n\n";
16
+ let Some(idx) = markdown.find(NEWLINES) else {
17
+ bail!("missing newlines after changelog title");
18
+ };
19
+ markdown.replace_range(0..idx + NEWLINES.len(), "");
20
+
21
let file_name = check_file_name(self.changelog)?;
22
let tag_name = &file_name[0..10];
23
let original_changelog_url = create_original_changelog_url(&file_name);
0 commit comments