← Otto Developer GuideVersioning & Releases

Otto ships as one thing: the compositor plus the components around it (otto-kit, otto-bar, otto-files, the portal, …). They are versioned together: a component’s version is the Otto release it belongs to, not an independent number.

One number, one place

The version lives in [workspace.package] in the root Cargo.toml:

[workspace.package]
version = "1.4.0"

Every workspace member inherits it:

[package]
name = "otto-kit"
version.workspace = true

So env!("CARGO_PKG_VERSION") reports the same string from any crate — the compositor’s otto --version, a component’s log banner, a D-Bus property. authors, edition, license and repository are inherited the same way; add new members with those four plus version.workspace = true and they join the scheme automatically.

The sample-clients/ crates are throwaway protocol test clients and stay outside this; they are never shipped.

Bumping

scripts/set-version.sh 1.4.1          # edit the version
scripts/set-version.sh 1.4.1 --tag    # …and commit + tag v1.4.1

The script validates that the argument is semver, then rewrites three places and refreshes Cargo.lock. Run with no argument to print the current version.

Two more files follow on their own:

Cargo.lock is tracked (.gitignore re-includes it with !/Cargo.lock) and carries every crate’s version, so the refreshed lockfile belongs in the bump commit. --tag stages only Cargo.toml and PKGBUILD, so amend the lockfile in before pushing.

Release checklist

  1. scripts/set-version.sh <version> --tag
  2. git cliff --tag v<version> -o CHANGELOG.md and commit the changelog
  3. git push --follow-tags

Which number to pick follows semver: fix: commits since the last tag → patch, feat: → minor, a !/BREAKING CHANGE commit → major. Pre-releases use a dotted suffix (1.0.0-rc.2). The packaging files spell that differently on purpose (pacman drops the hyphen, RPM turns it into ~), so 1.0.0rc.2 and 1.0.0~rc.2 are both correct.