Documentation: fix CGAL_DOC_VERSION to include pre-release suffixes#9433
Open
RajdeepKushwaha5 wants to merge 1 commit intoCGAL:mainfrom
Open
Documentation: fix CGAL_DOC_VERSION to include pre-release suffixes#9433RajdeepKushwaha5 wants to merge 1 commit intoCGAL:mainfrom
RajdeepKushwaha5 wants to merge 1 commit intoCGAL:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes documentation version handling so generated links (notably to example tarballs) include pre-release suffixes (e.g. -beta1, -dev), addressing broken URLs in beta releases (issue #8322).
Changes:
- For branch builds, prefer
CGAL_VERSION_PUBLIC_RELEASE_VERSION(fromCGALConfigVersion.cmake) to preserve full version strings with suffixes. - For tarball builds, extend the
version.hregex parsing to include an optional pre-release suffix.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…sue CGAL#8322) In branch builds, prefer CGAL_VERSION_PUBLIC_RELEASE_VERSION (e.g. '6.0-beta1') from CGALConfigVersion.cmake over recomputing the version from individual components, so that beta/dev suffixes are preserved in CGAL_DOC_VERSION. In non-branch builds without doc/public_release_name, fix the version.h regex fallback to also capture '-betaN' and '-dev' suffixes by changing '[0-9]+\.[0-9]+\.?[0-9]*' to '[0-9]+\.[0-9]+\.?[0-9]*(-[a-zA-Z0-9]+)?'. Without these fixes, CGAL_DOC_VERSION would be set to e.g. '6.0' for a beta1 release, causing broken links like: https://github.com/CGAL/cgal/releases/download/v6.0/CGAL-6.0-examples.tar.xz instead of the correct: https://github.com/CGAL/cgal/releases/download/v6.0-beta1/CGAL-6.0-beta1-examples.tar.xz
1e93beb to
2c2b21a
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Summary of Changes
In beta releases (e.g.
v6.0-beta1), the documentation links to example tarballs point to non-existent URLs like.../v6.0/CGAL-6.0-examples.tar.xzinstead of.../v6.0-beta1/CGAL-6.0-beta1-examples.tar.xzbecauseCGAL_DOC_VERSIONstrips the pre-release suffix.Fix (branch build path)
Use
CGAL_VERSION_PUBLIC_RELEASE_VERSION(set inCGALConfigVersion.cmake) which already contains the full version string including any-beta1or-devsuffix. Falls back to the existing major.minor.bugfix logic when that variable is not available.Fix (tarball build path)
Extend the regex that extracts the version from
version.hto also capture pre-release suffixes matching(-[a-zA-Z0-9]+)?.Release Management