Skip to content

feat: embed build information into binary and update CLI version display#38

Merged
tamada merged 2 commits into
release/v0.4.3from
issues/#36_update_version_info
Jan 12, 2026
Merged

feat: embed build information into binary and update CLI version display#38
tamada merged 2 commits into
release/v0.4.3from
issues/#36_update_version_info

Conversation

@tamada

@tamada tamada commented Jan 12, 2026

Copy link
Copy Markdown
Owner

No description provided.

@tamada tamada added this to the v1.0.0 milestone Jan 12, 2026
@tamada tamada requested a review from Copilot January 12, 2026 08:20
@tamada tamada self-assigned this Jan 12, 2026
@tamada tamada added documentation Improvements or additions to documentation enhancement New feature or request labels Jan 12, 2026

Copilot AI left a comment

Copy link
Copy Markdown

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 adds build-time information embedding into the CLI binary to provide detailed version information when users run gixor --version --long. The implementation includes a Cargo build script that collects Cargo features, git commit hash, branch name, and Rust compiler version, then embeds this information into the binary for display.

Changes:

  • Added build.rs script to collect and embed build metadata (features, git info, rustc version) into the binary
  • Modified CLI to display long version information from embedded build data
  • Updated GitHub Actions workflow to use GitHub Actions cache instead of registry cache for Docker builds

Reviewed changes

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

File Description
cli/build.rs New build script that collects build metadata and writes it to a file included in the binary
cli/src/cli.rs Updated CLI configuration to use the embedded long version string from build.rs
cli/Cargo.toml Added build script reference to enable build.rs execution
.github/workflows/publish.yaml Changed Docker build cache from registry-based to GitHub Actions cache

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

Comment thread cli/build.rs
Comment thread cli/build.rs Outdated
Comment thread cli/build.rs Outdated
Comment thread cli/build.rs Outdated
Comment thread cli/build.rs Outdated
Comment thread cli/src/cli.rs Outdated

#[derive(Parser, Debug)]
#[command(name = "gixor", author, version, about, arg_required_else_help = true)]
#[command(name = "gixor", author, version, long_version=BUILD_LONG_VERSION)]

Copilot AI Jan 12, 2026

Copy link

Choose a reason for hiding this comment

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

Missing space after the equals sign in the attribute. The attribute should be long_version = BUILD_LONG_VERSION (with spaces around the equals sign) for consistency with Rust style conventions.

Suggested change
#[command(name = "gixor", author, version, long_version=BUILD_LONG_VERSION)]
#[command(name = "gixor", author, version, long_version = BUILD_LONG_VERSION)]

Copilot uses AI. Check for mistakes.
@tamada tamada changed the base branch from main to release/v0.4.3 January 12, 2026 08:23
@coveralls

Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 20912452440

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 60.355%

Totals Coverage Status
Change from base Build 20888876581: 0.0%
Covered Lines: 781
Relevant Lines: 1294

💛 - Coveralls

@tamada tamada merged commit e2b73bd into release/v0.4.3 Jan 12, 2026
2 checks passed
@tamada tamada deleted the issues/#36_update_version_info branch January 13, 2026 04:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants