Skip to content

Conversation

@keivenchang
Copy link
Contributor

@keivenchang keivenchang commented Nov 11, 2025

Overview:

build.sh was only looking for tags on main, which breaks when main isn't tagged. Now it finds the latest tag from any branch.

Details:

  • Picks up the latest tag wherever it lives
  • Fixes version detection when main doesn't have the latest tag
  • Example: Previously found v0.1.0 (latest on main), now correctly finds v0.6.1 (actual latest tag).

Where should the reviewer start?

container/build.sh (line 35)

Related Issues:

Summary by CodeRabbit

  • Bug Fixes
    • Improved version tag detection during build process to consider all repository tags, rather than a limited scope, ensuring more accurate version identification.

Remove main branch restriction from git rev-list to find the latest tag
across all branches, fixing version detection when main branch is not
properly tagged.

Signed-off-by: Keiven Chang <[email protected]>
@keivenchang keivenchang self-assigned this Nov 11, 2025
@keivenchang keivenchang requested review from a team as code owners November 11, 2025 01:39
@github-actions github-actions bot added the fix label Nov 11, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 11, 2025

Walkthrough

Modified the latest_tag computation in the build script to consider all repository tags instead of limiting the search to tags on the main branch. The git command was updated to remove the branch-specific constraint while maintaining the existing fallback logic.

Changes

Cohort / File(s) Change Summary
Build script tag resolution
container/build.sh
Updated latest_tag git command to use all tags across the repository instead of filtering by main branch reference. Changed from git rev-list --tags --max-count=1 main to git rev-list --tags --max-count=1.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify the intent: confirm that broadening tag scope from main branch to all tags is the desired behavior
  • Test edge cases: ensure fallback to "0.0.1" still functions correctly when no tags exist
  • Consider downstream impact: check if any CI/CD or deployment workflows depend on main-branch-only tag behavior

Poem

A curious hare with twitching nose,
Explores the tags wherever they rose,
No branch constraints to bind its sight,
All repository versions shine bright,
Hopping through commits with newfound might! 🐰✨

Pre-merge checks

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: updating version detection to find the latest tag across all branches instead of only on main.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The pull request description follows the required template with all major sections completed: Overview explains the issue, Details lists the changes, Where to start guides reviewers, but Related Issues section lacks a specific issue reference.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@rmccorm4 rmccorm4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Keiven 🚀

@keivenchang keivenchang merged commit bba4132 into main Nov 11, 2025
29 of 40 checks passed
@keivenchang keivenchang deleted the keivenchang/update-build.sh-use-proper-tag-version branch November 11, 2025 04:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants