Skip to content

version: support runtime env overrides#4

Merged
chenzhongjie2 merged 3 commits into
masterfrom
feat/runtime-version-env
May 15, 2026
Merged

version: support runtime env overrides#4
chenzhongjie2 merged 3 commits into
masterfrom
feat/runtime-version-env

Conversation

@chenzhongjie2

Copy link
Copy Markdown

No description provided.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request introduces the ability to override versioning metadata—such as project name, version, commit ID, and build time—using environment variables. It includes a new internal lookupEnv helper and comprehensive unit tests. Feedback focuses on improving the robustness of the environment variable lookup by falling back on empty strings and ensuring test isolation by using t.Cleanup to restore global variables modified during testing.

Comment thread version/export.go
Comment thread version/export_test.go
Comment thread version/export_test.go
Comment thread version/export_test.go
Comment thread version/export_test.go
Comment thread version/export_test.go
@chenzhongjie2 chenzhongjie2 merged commit 528faf6 into master May 15, 2026
1 check 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.

2 participants