Skip to content

fix(build): default build version to dev instead of a stale date - #58

Merged
vernonstinebaker merged 1 commit into
mainfrom
fix/dynamic-build-version
Oct 3, 2026
Merged

vernonstinebaker merged 1 commit into
mainfrom
fix/dynamic-build-version

Conversation

@vernonstinebaker

Copy link
Copy Markdown
Contributor

Fixes #31.

  • Release builds are unaffected: the release flow injects -Dversion from the tag (v2026.5.29 binaries already report correctly).
  • Dev/source builds now default to dev (NullHub's convention) instead of a hard-coded date that had drifted four releases behind.
  • Verified: zig build test green; zig-out/bin/nullboiler --version → vdev on this branch; tagged release build (-Dversion=v2026.5.29) still stamps correctly.

Fixes #31

The static default (2026.3.3) had drifted four releases behind by the
time anyone built from source (#31). Release builds are unaffected: the
release flow injects -Dversion from the tag, exactly as before. Dev
builds now self-report as vdev — matching NullHub's convention — so a
stale date can never masquerade as a version again.

Fixes #31

@DonPrus DonPrus left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked #31 and traced the version through build_options, src/version.zig, the CLI/startup banner and /health. They already share one source, so changing the build fallback fixes all runtime reporting paths. Docker already defaults VERSION to dev; both the Docker release job and the reusable nullbuilder v1 release workflow explicitly pass -Dversion, so release stamping is preserved. The other 2026.3.3 occurrences are documentation examples, not competing runtime defaults.

Validation on da0008e with Zig 0.16.0: all 356 unit tests passed; a normal build prints nullboiler vdev; rebuilding with -Dversion=2026.5.29 prints nullboiler v2026.5.29. The change merges cleanly with main. No blocking findings.

Additional integration validation: merged current main (a7b7605) into the PR in an isolated local worktree; all 370 tests passed, and both default and explicitly stamped version outputs remained correct.

@vernonstinebaker
vernonstinebaker merged commit 80956d5 into main Oct 3, 2026
4 checks passed
@vernonstinebaker
vernonstinebaker deleted the fix/dynamic-build-version branch October 3, 2026 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Default version string in build.zig is stale (2026.3.3 vs latest v2026.5.29)

2 participants