-
Notifications
You must be signed in to change notification settings - Fork 116
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
--version points to git hash and date #755
Conversation
Today ramalama just share version 0.5.5 (as example) but don't tell users and developer which commit it's using. Resolves: containers#754 Signed-off-by: Douglas Schilling Landgraf <[email protected]>
Reviewer's Guide by SourceryThis pull request modifies the version reporting mechanism to dynamically fetch the version from Git using setuptools_scm. This ensures that the version reported includes the git hash and date, providing more precise information about the commit being used. Sequence diagram for the updated version reporting flowsequenceDiagram
participant User
participant RamaLama
participant Git
User->>RamaLama: ramalama --version
RamaLama->>Git: get_version()
Git-->>RamaLama: return git hash and date
RamaLama-->>User: display version with git info
Class diagram showing version module changesclassDiagram
class version {
+version()
+print_version(args)
}
note for version "Changed from static version to dynamic Git-based versioning"
class setuptools_scm {
+get_version()
}
version ..> setuptools_scm : uses
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey @dougsland - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider pinning the setuptools_scm version in pyproject.toml for reproducible builds.
- Review behavior when not in a Git repository; a graceful fallback may be desirable if setuptools_scm can't determine the version.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Today ramalama just share version 0.5.5 (as example) but don't tell users and developer which commit it's using.
Resolves: #754
Summary by Sourcery
Update the versioning scheme to use setuptools_scm, dynamically deriving the version from Git.
Build:
Chores: