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

xtask: Add release commit creation to release #508

Merged
merged 8 commits into from
Apr 14, 2021
Merged

xtask: Add release commit creation to release #508

merged 8 commits into from
Apr 14, 2021

Conversation

zecakeh
Copy link
Contributor

@zecakeh zecakeh commented Apr 14, 2021

This adds several step:

  1. Change the version in the macros crate manifest, if it exists.
  2. Change the version in the manifest of crates that depend on the macros crate.
  3. Change the version in the crate's manifest.
  4. Change the version in the manifest of crates that depend on the crate.
  5. Update the changelog of the crate.
  6. Ask confirmation for commit with option to see the diff.
  7. Commit and push.
  8. Continues to publishing and releasing as before.

I changed quite a bit the organisation of the code. The main reason is that we now get all the data for the crates from the cargo metadata result, to avoid having to also parse all the manifests.

The only remaining quirk is the ruma-identifiers-validation crate that won't work with this.

edit(jplatte): resolves #452

@zecakeh zecakeh requested a review from jplatte as a code owner April 14, 2021 10:43
@jplatte
Copy link
Member

jplatte commented Apr 14, 2021

The only remaining quirk is the ruma-identifiers-validation crate that won't work with this.

Since it has an independent version, it can just be handled like a "regular" crate without an associated macro crate.

Copy link
Member

@jplatte jplatte left a comment

Choose a reason for hiding this comment

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

First part of review (everything except release.rs)

xtask/README.md Outdated Show resolved Hide resolved
xtask/src/cargo.rs Outdated Show resolved Hide resolved
xtask/src/cargo.rs Show resolved Hide resolved
xtask/src/cargo.rs Outdated Show resolved Hide resolved
xtask/src/cargo.rs Outdated Show resolved Hide resolved
xtask/src/cargo.rs Outdated Show resolved Hide resolved
xtask/src/cargo.rs Outdated Show resolved Hide resolved
xtask/src/cargo.rs Outdated Show resolved Hide resolved
xtask/src/flags.rs Show resolved Hide resolved
@zecakeh
Copy link
Contributor Author

zecakeh commented Apr 14, 2021

Since it has an independent version, it can just be handled like a "regular" crate without an associated macro crate.

But according to the docs it shouldn't be tagged or released, right?

@jplatte
Copy link
Member

jplatte commented Apr 14, 2021

Since it has an independent version, it can just be handled like a "regular" crate without an associated macro crate.

But according to the docs it shouldn't be tagged or released, right?

Right. Probably should just be a special case.

@zecakeh
Copy link
Contributor Author

zecakeh commented Apr 14, 2021

I'm done with the commits. Ready for review again.

Copy link
Member

@jplatte jplatte left a comment

Choose a reason for hiding this comment

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

Looks very good overall, thanks again for working on this!

xtask/src/release.rs Outdated Show resolved Hide resolved
xtask/src/release.rs Outdated Show resolved Hide resolved
xtask/src/release.rs Outdated Show resolved Hide resolved
use String::clear() instead of re-assignment
@jplatte jplatte enabled auto-merge (squash) April 14, 2021 16:37
@jplatte jplatte merged commit bc62192 into ruma:main Apr 14, 2021
@zecakeh zecakeh deleted the release-more branch April 15, 2021 06:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Automate release process
2 participants