From 14d7ec42e7dc0fa3f9a8ae5864f2edad91f42dd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Thu, 9 May 2024 12:13:40 +0200 Subject: [PATCH] xtask: Don't try to read ruma-macros changelog and only publish it --- xtask/src/cargo.rs | 5 +++++ xtask/src/release.rs | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/xtask/src/cargo.rs b/xtask/src/cargo.rs index 91cba862..ca9ca62b 100644 --- a/xtask/src/cargo.rs +++ b/xtask/src/cargo.rs @@ -105,6 +105,11 @@ impl Package { /// /// If `update` is `true`, update the changelog for the release of the given version. pub fn changes(&self, update: bool) -> Result { + if self.name == "ruma-macros" { + // ruma-macros doesn't have a changelog and won't create a tag. + return Ok(String::new()); + } + let mut changelog_path = self.manifest_path.clone(); changelog_path.set_file_name("CHANGELOG.md"); diff --git a/xtask/src/release.rs b/xtask/src/release.rs index 066e26f1..a3e2a2ad 100644 --- a/xtask/src/release.rs +++ b/xtask/src/release.rs @@ -67,7 +67,8 @@ impl ReleaseTask { pub(crate) fn run(&mut self) -> Result<()> { let title = &self.title(); let prerelease = !self.version.pre.is_empty(); - let publish_only = self.package.name == "ruma-identifiers-validation"; + let publish_only = + ["ruma-identifiers-validation", "ruma-macros"].contains(&self.package.name.as_str()); println!( "Starting {} for {title}…",