Repository navigation
v5.1.0
v5.1.0 adds one new, opt-in flag to bear validate: --changed-since <environment>.
Everything else about validate β its output, its Git-free default, its lack of any
other deployment semantics β is unchanged. There is no breaking change and nothing
to migrate.
bear validate --changed-since <environment>
Validate always ran every selected artifact, whether or not it changed β a
deliberate design choice, since scoping to "what changed" needs to answer
against what, and validate never had an environment argument. That is still
true by default. --changed-since is the opt-in answer: name an environment,
and validate narrows its selection to the artifacts (and libraries) that
changed since that environment's last deployed commit in bear.lock.yml β
the exact same file-level comparison bear plan <environment> already uses to
decide what to deploy, including transitive dependency propagation.
bear validate --changed-since int # only what changed since int's last deploy
bear validate user-api order-api --changed-since int # named selection, further narrowed by change detection--changed-since names a different environment than --environment: it picks
which row of deployment history gates the selection; --environment still
only names the value injected into a step as ENVIRONMENT. The two are
independent and can be combined.
An artifact --changed-since excludes is not silently dropped β it is reported,
the same way bear plan reports a skip:
Bear Validate
βββββββββββββ
Validating 1 artifact
api: Validating... [1/2 Test]
api: Validating... [2/2 Build]
api: Validation complete after 2s
ββββββββββββββββββββββββββββββββββββββββ
Changed since: int
skip (1):
- web (services/web): no changes detected
Validation complete: 1 artifact in 2s
A selection that changes nothing at all short-circuits the same way an empty
bear plan does:
Bear Validate
βββββββββββββ
No changes detected since int's last deploy. Nothing to validate.
ββββββββββββββββββββββββββββββββββββββββ
Changed since: int
skip (2):
- api (services/api): no changes detected
- web (services/web): no changes detected
What This Does Not Change
- Without the flag, validate is exactly as it was: no environment, no
change detection, no deployment history, no Git. It still works in a shallow
clone or a plain export that is not a repository at all. - With the flag, validate still writes nothing.
--changed-sincereads
bear.lock.yml; it never writes it, and.bear/plan.ymlis still neither
read nor written. No deployment policy is selected or checked: an artifact
with noenvironmentsallowlist, or one excluding the named environment,
is still validated if its source changed. - Naming artifacts still means exactly those artifacts.
--changed-since
only narrows an existing selection further; it never adds a dependency to a
selection you named yourself. A changed dependency can still keep its
dependent in a named selection β the same propagationbear planalready
does β without ever validating the dependency itself unless it was named too. - A library with no deployment history still always counts as changed.
Libraries are never deployed, so they never accumulate lock history in any
environment;--changed-sincetreats that exactly like a genuinely new
artifact, matchingbear plan.
Requirements
Unlike the rest of validate, --changed-since needs a real Git repository (to
diff against the recorded commit) and a readable bear.lock.yml. Without
--changed-since, neither is required. --changed-since must still name an
environment declared in bear.config.yml, rejected before anything runs, the
same way --environment already is.
See bear validate and
Change Detection for the full reference.
Upgrading
There is nothing to change in configuration, CI invocation, or artifact
definitions. --changed-since is entirely opt-in; every existing bear validate
invocation behaves identically.
Pin the release instead of automatically moving to latest:
git clone --branch v5.1.0 --depth 1 https://github.com/irevolve/bear.git bear-v5
go -C bear-v5 install -ldflags="-X github.com/irevolve/bear/commands.Version=5.1.0" .Use Go 1.25+ and put the Go install directory on PATH. Platform binaries are
listed on the v5.1.0 release.
Container versions are ghcr.io/irevolve/bear:5.1.0, :5.1.0-alpine, and
:5.1.0-debian.
Full Changelog: v5.0.2...v5.1.0