Skip to content

feat: report GREEN_RELEASE via --version in all executables - #56

Merged
gauravharsha merged 2 commits into
mainfrom
feat-release-in-binary
Jun 25, 2026
Merged

feat: report GREEN_RELEASE via --version in all executables#56
gauravharsha merged 2 commits into
mainfrom
feat-release-in-binary

Conversation

@gauravharsha

Copy link
Copy Markdown
Contributor

Add a --version flag to mbpt.exe, embedding.exe, and int-transform.exe that prints the build's release string (GREEN_RELEASE). The release also appears as a Version: line in --help and the parameter dump.

Implemented by passing GREEN_RELEASE (already a compile definition) to the params constructor; the --version/--help printing and exit are handled by the params parser.

Verified: --version prints the release and exits 0 on all three executables; --help shows the Version: line.

🤖 Generated with Claude Code

Wire GREEN_RELEASE as a compile definition for mbpt.exe, embedding.exe and
int-transform.exe, and inject it into the params parser via its constructor.
Each binary now reports its release through --version, and via a "Version:"
line in --help and the parameter dump, using the unified help_or_version()
stop handling. Requires green-params with the native --version flag (merged).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Comment thread main.cpp Outdated

Copilot AI 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.

Pull request overview

This PR wires the build’s GREEN_RELEASE string into the CLI parameter system for all shipped executables so they can report a consistent release via --version, and also show it in --help / parameter dumps.

Changes:

  • Pass GREEN_RELEASE into the green::params::params constructor for mbpt.exe, embedding.exe, and int-transform.exe.
  • Switch help printing on parse-short-circuit to help_or_version() and treat it as a successful (0) exit.
  • Define GREEN_RELEASE as a per-target compile definition for the three executables in CMake.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
main.cpp Supplies GREEN_RELEASE to params and uses help_or_version() on early-exit parse path.
embedding.cpp Same as main.cpp, for the embedding executable.
itransform.cpp Passes GREEN_RELEASE to params, removes redundant parse call, and uses help_or_version() on early-exit parse path.
CMakeLists.txt Adds GREEN_RELEASE compile definitions for all three executables.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gauravharsha
gauravharsha merged commit 62dc93e into main Jun 25, 2026
2 checks passed
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.

3 participants