Announcing Cocogitto 5.3.0

For those who don't know, Cocogitto is a Conventional Commit and SemVer swiss army knife. You can create Conventional Commits with the CLI, automatically release new version, enforce the specifications with the GitHub bot and action etc.

Changelog

Changelog for the upcomming 5.3.0 version (generated by Cocogitto)


Bug Fixes

Documentation

Features

Miscellaneous Chores

Refactoring

Tests


Thanks

❤️ Kudos to @stephenc, @DaRacci, @lucatrv, @tranzystorek-io who contributed to the upcomming Cocogitto release !

Mono-repository support

It's been a while since I last worked on it. And it was mainly in maintenance mode. But lately I have been working on Gill, an activity pub based git platform. It's not ready for production yet, but it is already a big project with a dozen crates in the cargo workspace.

Unfortunately I was not able to use Cocogitto for this project because of its mono-repository nature. The least I could do for a project so closely related to git is to correctly manage versioning, so finally decided to tackle mono-repo support in Cocogitto.

Global version

Without further ado here is a sample of the first repository changelog generated by Cocogitto: gill-changelog.png

As you can see the automatic bump performed by Cocogitto generated a global changelog and created a tag for each updated crate on the workspace. There were no previous tag on the repository so a new version was created for each crate. Subsequent bumps will generate a new version only for crates modified since the previous release.

The mono-repository bump also generate a global project tag. It's calculated based on the generated package tags or on the global commits.

Per package version

The bump also generated a new changelog for each updated crate:

monorepo-package-changelog.png

How to

Mono-repo support is just a matter of configuration. If you have used Cocogitto before, all you need to do is to update your cog.toml to declare your monorepo packages.

Here is a sample of Gill's configuration

pre_bump_hooks = [
"SQLX_OFFLINE=true cargo test",
"SQLX_OFFLINE=true cargo clippy",
"cargo fmt --all",
"SQLX_OFFLINE=true cargo build --release",
]

post_bump_hooks = [
"git push",
"git push origin --tags",
]

pre_package_bump_hooks = [
"cargo set-version {{version}}"
]

[packages]
gill-app = { path = "crates/gill-app" }
gill-authorize-derive = { path = "crates/gill-authorize-derive", public_api = false }
gill-db = { path = "crates/gill-db", public_api = false }
gill-git = { path = "crates/gill-git", public_api = false }
gill-git-server = { path = "crates/gill-git-server" }
gill-markdown = { path = "crates/gill-markdown", public_api = false }
gill-settings = { path = "crates/gill-settings" }
gill-syntax = { path = "crates/gill-syntax" }
gill-web-markdown = { path = "crates/gill-web-markdown" }
syntect-plugin = { path = "crates/syntect-plugin", public_api = false }

Differences with standard bump