The freeze policy, evaluated. Pure.
A contract library's whole value is that consumers can pin it and forget it. Two things destroy that: a change they cannot survive, and a cadence that makes them re-pin constantly. This namespace decides both from data.
Policy shape (./freeze-policy.edn in the repo being released):
{:policy/version 1 :cadence {:mode :scheduled | :on-merge :min-days-between-releases 90 :exception-marker "release-exception:"} :compatibility {:additive-only? true :break-marker "BREAKING-CHANGE:"}}
Contract: evaluate never throws and never consults the world — every
observation (the diff, the age, the commit message) is passed in.
The freeze policy, evaluated. Pure.
A contract library's whole value is that consumers can pin it and forget it.
Two things destroy that: a change they cannot survive, and a cadence that
makes them re-pin constantly. This namespace decides both from data.
Policy shape (./freeze-policy.edn in the repo being released):
{:policy/version 1
:cadence {:mode :scheduled | :on-merge
:min-days-between-releases 90
:exception-marker "release-exception:"}
:compatibility {:additive-only? true
:break-marker "BREAKING-CHANGE:"}}
Contract: `evaluate` never throws and never consults the world — every
observation (the diff, the age, the commit message) is passed in.(cadence-violation {:keys [cadence]} {:keys [days-since-last commit-message]})A violation map when this release breaks the cadence rule, else nil.
days-since-last nil means there is no previous release — the first release
is always allowed.
A violation map when this release breaks the cadence rule, else nil. `days-since-last` nil means there is no previous release — the first release is always allowed.
(compatibility-violation {:keys [compatibility]}
{:keys [diff breaking? descriptions commit-message]})A violation map when this release breaks consumers, else nil.
A violation map when this release breaks consumers, else nil.
The policy a repo gets when it ships no freeze-policy.edn: nothing is enforced. Absence of a policy must not silently mean absence of releases.
The policy a repo gets when it ships no freeze-policy.edn: nothing is enforced. Absence of a policy must not silently mean absence of releases.
(evaluate policy observations)The freeze verdict for one release attempt.
observations: {:diff :breaking? :descriptions :days-since-last :commit-message}
Returns {:ok? bool :violations [...] :policy policy}.
The freeze verdict for one release attempt.
`observations`: {:diff :breaking? :descriptions :days-since-last :commit-message}
Returns {:ok? bool :violations [...] :policy policy}.(report-lines {:keys [ok? violations]})Human-readable verdict, for CI output.
Human-readable verdict, for CI output.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |