xtask: Disallow releasing a macro crate without its parent crate
This commit is contained in:
parent
32398d187b
commit
233b473041
@ -62,6 +62,18 @@ impl ReleaseTask {
|
|||||||
let prerelease = self.version.is_prerelease();
|
let prerelease = self.version.is_prerelease();
|
||||||
let publish_only = self.package.name == "ruma-identifiers-validation";
|
let publish_only = self.package.name == "ruma-identifiers-validation";
|
||||||
|
|
||||||
|
if let Some(name) = self.package.name.strip_suffix("-macros") {
|
||||||
|
return Err(format!(
|
||||||
|
"Macro crates are always released together with their parent crate.\n\
|
||||||
|
To release both {main_cr} and {macro_cr}, simply run\n\
|
||||||
|
\n\
|
||||||
|
cargo xtask release {main_cr}",
|
||||||
|
main_cr = name,
|
||||||
|
macro_cr = self.package.name,
|
||||||
|
)
|
||||||
|
.into());
|
||||||
|
}
|
||||||
|
|
||||||
println!(
|
println!(
|
||||||
"Starting {} for {}…",
|
"Starting {} for {}…",
|
||||||
match prerelease {
|
match prerelease {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user