Skip to content

Fix docs version detection for master branch builds#631

Merged
laughingman7743 merged 1 commit intomasterfrom
fix/docs-version-detection
Jan 1, 2026
Merged

Fix docs version detection for master branch builds#631
laughingman7743 merged 1 commit intomasterfrom
fix/docs-version-detection

Conversation

@laughingman7743
Copy link
Member

Summary

  • Fix documentation version detection to show clean tag versions instead of dev versions
  • Use git describe --tags --abbrev=0 to get the latest tag without commit count suffix

Problem

When the master branch is pushed before its corresponding version tag is created, the documentation shows dev versions like v3.21.2-2-g8d4e41c26 instead of the clean version v3.22.0.

This happens because:

  1. Master branch push triggers the docs workflow
  2. git describe --tags --exact-match fails (no exact tag at HEAD yet)
  3. git describe --tags --always returns a dev version with commit count

Solution

Replace git describe --tags --always with git describe --tags --abbrev=0 which returns the latest tag without the commit count suffix. This ensures master docs always show the latest clean tag version.

Test Plan

  • Run make chk - all checks pass
  • Merge PR and create new tag to verify docs show correct version

🤖 Generated with Claude Code

Use `git describe --tags --abbrev=0` instead of `--always` to get the
latest tag without commit count suffix. This prevents the documentation
from showing dev versions like "v3.21.2-2-g8d4e41c" when the master
branch is pushed before its corresponding version tag is created.

The issue occurred because:
1. Master branch push triggers docs build
2. Version tag is created after the push
3. git describe --always returns a dev version since no exact tag match

Now the master docs will show the latest clean tag version regardless
of the timing between master push and tag creation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@laughingman7743 laughingman7743 marked this pull request as ready for review January 1, 2026 09:38
@laughingman7743 laughingman7743 merged commit 217f863 into master Jan 1, 2026
5 checks passed
@laughingman7743 laughingman7743 deleted the fix/docs-version-detection branch January 1, 2026 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant