- 
                Notifications
    
You must be signed in to change notification settings  - Fork 4
 
Fix duplicate build script rules and inject version dynamically #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: jl.jiang <[email protected]>
Signed-off-by: jl.jiang <[email protected]>
…o `_` Signed-off-by: jl.jiang <[email protected]>
Signed-off-by: jl.jiang <[email protected]>
There was a problem hiding this comment.
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 fixes duplicate build script rule generation and adds dynamic version injection with git metadata. The changes prevent build errors from duplicate buildscript_run rules and enhance version traceability by including git commit hash and date in the binary version string.
Key changes:
- Refactored build script handling to eliminate duplicate rule generation by extracting patch logic into a reusable function
 - Implemented dynamic version string generation using build-time git metadata
 - Added a dedicated 
versionsubcommand to display the enhanced version information 
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description | 
|---|---|
| src/buckify.rs | Refactored build script rule generation to prevent duplicates by centralizing patching logic and removing redundant code blocks | 
| src/main.rs | Added build_version() function to generate version strings with git metadata using OnceLock for caching | 
| src/commands/version.rs | New version subcommand that displays the dynamically generated version string | 
| src/commands/mod.rs | Registered the new version command module | 
| src/cli.rs | Integrated dynamic version into CLI and added version subcommand handler | 
| build.rs | Build script to extract git commit hash and date at compile time | 
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
This PR addresses two issues:
buildscript_run), which previously caused build errors.buckal 0.0.0 (108061b 2025-10-14)) to improve traceability in binaries.