ReviewOS

also looking at this

zig-utils/zig-test-framework

build: single-source the package and CLI version

#20
Merged glennmichael123 wants to merge codex/issue-13-version into main
7 files +40 -11
9 days ago

Closes #13.

Treats build.zig.zon as the one authoritative release version. build.zig extracts that value at configuration time, validates it as semantic version metadata, injects it into the framework module, and uses it for zig-test --version. The stale independent package.json version is removed.

The default test target invokes the built CLI and compares its exact version output with the manifest-derived value. Release documentation now states that only build.zig.zon needs a version change.

This PR is stacked on #19 so its diff stays scoped to issue #13. Merge #19 first, then retarget this PR to main.

Verification:

  • zig fmt --check .
  • zig build
  • zig build test
  • zig build examples
  • zig build -Dtarget=x86_64-linux-gnu
  • zig build run -- --version prints Zig Test Framework v0.2.2

7 changed files on the files tab, with 0 review threads.

Sign in to comment on this pull request.