Skip to content

Nothing checks the four copies of the version agree #1192

Description

@Chemaclass

Problem

The version lives in four places, and release.sh bumps all four together:

file carrier
bashunit BASHUNIT_VERSION="0.47.0"
action.yml default: '0.47.0'
install.sh LATEST_BASHUNIT_VERSION="0.47.0"
package.json "version": "0.47.0"

release_update_test.sh covers those updaters against mock files, which
proves the functions work — not that the repo's own four copies currently
agree. They can drift from a release that failed partway, a hand-edit, or a
merge resolved the wrong way.

Each drift fails differently and quietly:

  • action.yml stale → every TypedDevs/bashunit@v0 user installs an old binary
  • install.sh stale → the documented curl-installer pins the wrong release
  • package.json stale → npm publishes under a version that is not this code

None of it surfaces in a test run.

Fix

Assert the four agree, reading the entrypoint as the source of truth.

Includes a guard on the guard: if the version extraction ever stops matching,
every assertion would compare "" against "" and pass while checking
nothing — so one test asserts the extracted value is a real version string.

Mutation-verified: desyncing each of the three dependents fails exactly its own
test.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions