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

add release documentation to CONTRIBUTING.md #1171

Merged
merged 4 commits into from
Jul 3, 2019
Merged

Conversation

hawkw
Copy link
Member

@hawkw hawkw commented Jun 22, 2019

Motivation

Currently, the process for releasing a new version of a Tokio crate is
somewhat complex, and is not well-documented. To make it easier for
contributors to release minor versions more frequently, there should be
documentation describing this process.

Solution

This branch adds a section to CONTRIBUTING.md describing how to
release a new version of a Tokio crate. The steps are based on those
described by @carllerche in an offline conversation.

I've also added a quick shell script to actually publish new crate
versions. This should make it harder to make mistakes when
publishing.

Signed-off-by: Eliza Weisman eliza@buoyant.io

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
@hawkw hawkw added T-docs Topic: documentation meta C-maintenance Category: PRs that clean code up or issues documenting cleanup. labels Jun 22, 2019
@hawkw hawkw requested a review from a team June 22, 2019 18:22
@hawkw hawkw self-assigned this Jun 22, 2019
@hawkw hawkw requested a review from carllerche June 22, 2019 23:30
the next step.
7. **Release the crate.** Run the following commands:

```bash
Copy link
Member

Choose a reason for hiding this comment

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

we could just put this as a shell script in the repo somewhere?

Copy link
Member Author

Choose a reason for hiding this comment

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

not a bad idea! i'll take a crack at writing that...

Copy link
Member Author

Choose a reason for hiding this comment

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

@LucioFranco i wrote a quick shell script for publishing, let me know what you think!

Copy link
Member

Choose a reason for hiding this comment

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

I can't read bash... as long as it does the right thing, sounds good to me. How does the script prevent publishing crates that should not be published?

Copy link
Member Author

@hawkw hawkw Jun 28, 2019

Choose a reason for hiding this comment

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

@carllerche it will fail before releasing if:

  • the git tag has already been pushed
  • the crate contains path deps
  • the version in. Cargo.toml doesn't match the version you said you were releasing

and if cargo package/cargo publish fails, it won't push a git tag.

We can probably add more checks (grep changelog for the version?) in the future.

hawkw added 2 commits June 24, 2019 14:09
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Copy link
Member

@LucioFranco LucioFranco left a comment

Choose a reason for hiding this comment

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

LGTM the script will be handy!

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
@hawkw
Copy link
Member Author

hawkw commented Jul 3, 2019

@carllerche shall I go ahead and merge this?

@carllerche
Copy link
Member

Ah yes, thanks 👍

@hawkw hawkw merged commit bd9760e into master Jul 3, 2019
@carllerche carllerche deleted the eliza/release-doc branch July 8, 2019 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-maintenance Category: PRs that clean code up or issues documenting cleanup. T-docs Topic: documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants