-
Notifications
You must be signed in to change notification settings - Fork 110
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
fix(ci): use FullCommit and align version.sh logic #2646
Conversation
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughWalkthroughThe recent changes enhance the handling of commit identifiers and version string formatting in the Changes
Sequence Diagram(s)sequenceDiagram
participant Developer
participant VersionScript as version.sh
participant GoReleaser as .goreleaser.yaml
Developer->>VersionScript: Request version details
VersionScript->>Developer: Returns version without 'v' prefix
Developer->>GoReleaser: Triggers build process
GoReleaser->>GoReleaser: Uses FullCommit for versioning
GoReleaser->>Developer: Outputs build artifacts with accurate version
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (2)
- .goreleaser.yaml (3 hunks)
- version.sh (1 hunks)
Additional context used
Path-based instructions (1)
version.sh (1)
Pattern
**/*.sh
: Review the shell scripts, point out issues relative to security, performance, and maintainability.
Additional comments not posted (6)
version.sh (3)
6-8
: LGTM!The change correctly removes the 'v' prefix from the version string to match the goreleaser logic.
15-15
: LGTM!The change correctly updates the version string format for dirty builds to remove the 'v' prefix.
22-22
: LGTM!The change correctly updates the version string format for develop builds to remove the 'v' prefix.
.goreleaser.yaml (3)
56-56
: LGTM!The change correctly replaces
{{ .Env.COMMIT }}
with{{ .FullCommit }}
to use more comprehensive commit identifiers.
59-59
: LGTM!The change correctly replaces
{{ .Env.COMMIT }}
with{{ .FullCommit }}
to use more comprehensive commit identifiers.
102-102
: LGTM!The change correctly replaces
{{ .Commit }}
with{{ .FullCommit }}
to use more comprehensive commit identifiers.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #2646 +/- ##
===========================================
- Coverage 70.35% 70.35% -0.01%
===========================================
Files 338 338
Lines 18594 18593 -1
===========================================
- Hits 13082 13081 -1
Misses 4920 4920
Partials 592 592 |
Description
The Commit variable isn't set correctly on the v19.0.0 release:
Use
.FullCommit
instead. I'm not exactly sure why the.Env
wasn't working.Also strip the v from the version in
version.sh
to align with the goreleaser version logic.Summary by CodeRabbit
These changes ensure more precise versioning and better integration with build tools.