← Otto Developer GuideVersioning & Releases
Otto ships as one thing: the compositor plus the components it launches
(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.0.0-rc.1"
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.0.0-rc.2 # edit the version
scripts/set-version.sh 1.0.0-rc.2 --tag # …and commit + tag v1.0.0-rc.2
The script rewrites [workspace.package].version, validates the argument is
semver, and refreshes Cargo.lock. Run with no argument to print the current
version. Nothing else in the tree needs touching:
- Cargo.lock is gitignored, so it never appears in the bump commit.
- PKGBUILD-git derives
pkgverfromgit describe, so the tag is what moves it —1.0.0-rc.1+ 3 commits becomes1.0.0rc1.r3.g51822a84. - CHANGELOG.md is generated by git-cliff from the commit log between tags.
Release checklist
scripts/set-version.sh <version> --taggit cliff --tag v<version> -o CHANGELOG.mdand commit the changeloggit 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); note that PKGBUILD-git
strips the hyphens for pacman’s benefit, which is expected.