-
Notifications
You must be signed in to change notification settings - Fork 206
Add ability to yank different crate sets to the publisher tool #2933
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
8d49a5b
to
eeecfbe
Compare
A new generated diff is ready to view.
A new doc preview is ready to view. |
#[derive(Copy, Clone, Debug, ArgEnum, Eq, PartialEq, Ord, PartialOrd)] | ||
pub enum CrateSet { | ||
/// (default) Yank all crates associated with the release. | ||
All, | ||
/// Yank all AWS SDK crates. | ||
AllAwsSdk, | ||
/// Yank generated AWS SDK crates. | ||
GeneratedAwsSdk, | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to make sure I understand correctly:
All
: AWS SDKs, AWS runtime crates, smithy runtime cratesAllAwsSdk
: AWS SDKs, AWS runtime cratesGeneratedAwsSdk
: AWS SDKs
Is that correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's correct.
.tag | ||
.as_ref() | ||
.ok_or_else(|| { | ||
anyhow!("Versions manifest doesn't have a release tag. Can only yank tagged releases.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In what cases could this occur? If we did a manual release and never tagged it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can happen if you download a generated SDK from CI or something and try to yank with its version.toml.
info!("This will yank aws-sdk-rust's `{tag}` release from crates.io."); | ||
info!("Crates to yank:"); | ||
for (crate_name, crate_version) in &release.crates { | ||
for (crate_name, crate_version) in crates { | ||
info!(" {}-{}", crate_name, crate_version); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to ignore this since you didn't touch this line.
info!(" {}-{}", crate_name, crate_version); | |
info!("\t{}-{}", crate_name, crate_version); |
We should use tab characters instead of spaces for stuff like this.
This PR adds different crate sets to the publisher tool so that different groups of crates can be yanked rather than yanking everything.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.