Skip to content
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

feat: try to publish a crate until it succeeds #843

Merged
merged 1 commit into from
Jul 20, 2022

Conversation

hendrikmaus
Copy link
Contributor

Fixes #788

This change-set introduces a loop around the publish command for the crate in scope. It will repeatedly attempt to publish if the command fails. The loop is limited by a timeout as well as a maximum number of attempts.

limited by a maximum number of attempts and a timeout.

if !exit_status.success() {
match exit_status.code() {
Some(code) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI: no need to check which code came back as there is only a single failure code https://doc.rust-lang.org/cargo/commands/cargo-publish.html#exit-status

Copy link
Owner

@hannobraun hannobraun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @hendrikmaus! Looking forward to trying it out next week!

@hannobraun hannobraun merged commit 80bc6ce into hannobraun:main Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Release automation can fail, because just-published crate is not found
2 participants