Skip to content

6. The release train ​

Releasing a family by hand means: release the bottom library, wait for it, update its dependents' locks, release them, and so on up the graph. release plans the whole train first:

console
$ fobis ecosystem release --dry-run --no-wait
Release plan (dependencies first)
   1. core  v1.0.0 -> v1.1.0        ready  (minor, 1 releasable commit(s))
        ! CI at HEAD: unknown
        ! not on GitHub: the GitHub release cannot be awaited

Dry run: nothing released.
  • Only projects with releasable commits are released (mathx's docs commit is not), each with the version its Conventional Commits call for (--bump NAME=major|minor|patch|vX.Y.Z overrides one).
  • Anything that would make a release fail blocks the whole train before it starts: uncommitted changes, a branch behind its upstream, a failing CI, a tag that exists already, no release script, no git-cliff. The ! lines are warnings only.

Then it runs: each project's own scripts/release.sh VERSION (the one fobis scaffold installs, or yours), a check that the tag reached the remote, and fobis fetch --update in the direct dependents, so the next ones release against the new version.

console
$ fobis ecosystem release --yes --no-wait
Release plan (dependencies first)
   1. core  v1.0.0 -> v1.1.0        ready  (minor, 1 releasable commit(s))
        ! CI at HEAD: unknown
        ! not on GitHub: the GitHub release cannot be awaited

==> core: ./scripts/release.sh v1.1.0
  Current version : v1.0.0
  New version     : v1.1.0
Released v1.1.0!

==> mathx: fobis fetch --update
Updating core
Saved deps config to third_party/.deps_config.ini
Saved lock file to third_party/fobos.lock

==> app: fobis fetch --update
Updating mathx
Updating core
Saved deps config to third_party/.deps_config.ini
Saved lock file to third_party/fobos.lock

Project  Result        Time  Detail
core     passed        0.0s  v1.1.0 pushed (GitHub release not awaited)

1 passed, 0 failed

(--yes answers every question, as a CI job would; --no-wait skips waiting for the GitHub release, which the demo, not on GitHub, cannot have.) The pins are current again:

console
$ fobis ecosystem dashboard --no-ci
Project  Branch  Tree   Upstream  Version / tag    Unreleased          CI       Drift  Pins
-------  ------  -----  --------  ---------------  ------------------  -------  -----  -------
core     master  clean  in sync   v1.1.0 / v1.1.0  0                   unknown  0      -
mathx    master  clean  in sync   v1.0.0 / v1.0.0  1, none to release  unknown  0      current
app      master  clean  in sync   v1.0.0 / v1.0.0  0                   unknown  0      current

If a release fails, the train stops there and prints the --from command that resumes it.

fobis ecosystem release

The demo ecosystem of this track: core, mathx, app.

What you learned

fobis ecosystem release, --dry-run, --yes, --bump, --from. The ecosystem guide covers the configuration and the safety rules in full.

This is the end of the third track. The fourth comes back to quad, to look at its code.