Replies: 1 comment
-
This should just be a By default If the package in question is not on
For some complex reasons, it's better to use a slightly tweaked approach where no version numbers are computed. The conventional commit makes a claim on whether there are any breaking changes or not.
In this case, you'll want to use a git baseline with the commit hash of the previous commit (not the one in the process of being created). This should again work fairly seamlessly. The one caveat is that currently baseline rustdoc JSON files that aren't generated from a crates.io version are not cached. This is a tradeoff: the JSON files can often be very large, and unlike Depending on the project size you're working with, it may at some point be a good idea to start thinking about managing a rustdoc JSON cache to speed up the pre-commit hook. Or, perhaps it might be better to run it as a post-commit check in some fashion, so that the user isn't kept waiting. As maintainer of |
Beta Was this translation helpful? Give feedback.
-
Hello, I am the author of cocogitto, a conventional commits-based release manager.
I came across cargo-semver-check at FOSDEM 2024, and it made me wonder how I could use it along with cocogitto.
Cocogitto calculates the next version number based on the repository's conventional commit history and performs a set of user-defined commands to create a release with the expected tag. It's great for automating the whole release process, but ultimately, we trust user commits to calculate the next version number.
Unfortunately, I cannot integrate
cargo-semver-check
the same wayrelease-plz
does. Cocogitto does not use PRs to release, and it supports any language, so I cannot usecargo-semver-check
by default.My idea is to integrate
cargo-semver-check
both into the release process and as a commit hook. But I think that would require a subcommand that outputs the suggested version bump or accepts a target SemVer tag.Release management example: For instance, I trigger a version bump with cocogitto from version 1.0.0; it calculates a minor bump. Before writing the new tag, I want to ensure the tag calculated by cocogitto matches cargo-semver-check's output.
Conventional commits example: I am done working on this new feature in my project and create a new feature commit, following the conventional commit specification.
cargo-semver-check
runs as a post-commit hook along withcocogitto
; they both output a next version number. If those numbers do not match, I probably need to rewrite my commit message so it has the correct conventional commit type.I am not sure if this is currently possible with cargo semver checks.
If not, I would like to contribute to make that possible. What would be the best approach for this?
Beta Was this translation helpful? Give feedback.
All reactions