Introducing `cargo smart-release` - the new way to release workspace crates

Developing gitoxide is great fun, except for one.little.thing: Releases. They hurt, and I so far as to postpone releases forever.

But just use cargo release I hear you say, and you are right. Every other crate I release that way and I am mostly happy, but with gitoxide and its interdependent entangled plumbing crates the single-publish-paradigm is not up to the task anymore.

Three days ago I did yet another semi-manual release and I simply couldn't take it anymore. I am clearly too stupid and too lazy to deal with this mess so I decided to retire a never-used-and-non-functional bash script with a utility which later became cargo smart-release. It took a bit longer than expected, which kind of was expected ;), but here we are.

Here is the anticipated workflow, straight from the README file:

Preferred workflow

When developing various crates in a workspace I tend to edit code, and depending on the kind of edit, either increase the patch level, minor version or major version right after, depending on the basic rules of semver. Use cargo smart-release --bump minor --skip-tag --skip-publish --execute for this which has the benefit of it automatically adjusting other workspace dependencies when needed.

When ready for relasing a particular crate or set of crates of interest, run cargo smart-release [<crate-name> ...] to simulate a release. For particularly thorough but error-prone simulations (as in false positives) one could run cargo smart-release --dry-run-cargo-publish. After evaluating the release procedure and following instructions, one should end up with a fully automatic release of multiple crates. There are various other options that shouldn't be needed in the common case, use cargo smart-release --help to see them.

It was nice that after some twists I was able to release cargo smart-release with cargo smart-release and do so with minimal zero hassle. Exactly what I wanted.

I will keep dog-fooding it and polish it more over time, ultimately replacing all git command-line invocations with gitoxide of course and hopefully freeing the dependency tree of git2 one day.

Until then, you can expect more regular releases of gitoxide crates from now on.

Have a nice day!

PS: Really, use cargo release if you don't have issues with it. And if you do, definitely don't write your own but participate in its vibrant and friendly community :).


This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.