Skip to content

Conversation

@SchulteDev
Copy link

Refactor build metadata injection logic:

  • Introduced build_info package to manage version, commit, and date details.
  • Removed ldflags-based metadata injection.
  • Updated workflows and Dockerfile to prepare build_info files.
  • Added unit tests for build_info initialization and formatting.
    Because: Since build-metadata no longer needs compiling to binary, this information can already be defined at the source code level.
    Related feat: enable go run execution by moving main to root #630
@SchulteDev SchulteDev requested a review from a team as a code owner July 16, 2025 18:23
Refactor build metadata injection logic: - Introduced `build_info` package to manage version, commit, and date details. - Removed ldflags-based metadata injection. - Updated workflows and Dockerfile to prepare `build_info` files. - Added unit tests for `build_info` initialization and formatting. Because: Since build-metadata no longer needs compiling to binary, this information can already be defined at the source code level. Related github#630
- Extracted `build_info` preparation logic to `script/prepare-build-info`. - Updated Dockerfile and GitHub workflows to use the new script. - Simplified metadata injection process for better reusability.
- Replaced direct file paths with relative command paths in scripts and config files for consistency. - Enhanced build info generation with improved handling of commit and branch information. - Updated `.gitignore` to include dynamic build info files. - Enabled write access in Dockerfile bind mount to align with changes.
@SchulteDev SchulteDev force-pushed the chore/embed-build_info branch from 2ab52b9 to 55dc371 Compare July 21, 2025 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant