Automatic versoning in CI/CD?

In some nodejs projects I've worked on there has been a feature that checks your commit messages to make sure it follows a certain template or pattern. Then during build and release in CI/CD the commit messages are parsed and used to set the new version of the build. And also to generate a document with release notes.

I could use the same npm stuff in my rust-project I guess, but someone have probably already solved this using cargo? Is there a change someone could point me in the right direction?

I think you're talking about conventional commits and tools to enforce it, such as Commitizen (based on Node.js).

This can be done with Release Please (also Node.js) and similar tools.

Conventional commits came from the frontend web development community so the most popular tools for them are Node-based. If you're averse to using the JS tooling, you can check this page for tools in other languages or that run in VS Code, JetBrains IDEs, etc.

I don't think conv commits are widely used in the Rust community, but there are a few Rust tools for working with them that are still maintained. A quick search turned up:

2 Likes

I just came here to +1 the Release Please tool.

I first heard about it when reading about fasterthanlime's Dev setup and it's absolutely amazing.

3 Likes

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.