Skip to content

Documentation: fix CGAL_DOC_VERSION to include pre-release suffixes#9433

Open
RajdeepKushwaha5 wants to merge 1 commit intoCGAL:mainfrom
RajdeepKushwaha5:fix/cgal-doc-version-beta
Open

Documentation: fix CGAL_DOC_VERSION to include pre-release suffixes#9433
RajdeepKushwaha5 wants to merge 1 commit intoCGAL:mainfrom
RajdeepKushwaha5:fix/cgal-doc-version-beta

Conversation

@RajdeepKushwaha5
Copy link
Copy Markdown
Contributor

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.xz instead of .../v6.0-beta1/CGAL-6.0-beta1-examples.tar.xz because CGAL_DOC_VERSION strips the pre-release suffix.

Fix (branch build path)

Use CGAL_VERSION_PUBLIC_RELEASE_VERSION (set in CGALConfigVersion.cmake) which already contains the full version string including any -beta1 or -dev suffix. 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.h to also capture pre-release suffixes matching (-[a-zA-Z0-9]+)?.

Release Management

Copilot AI review requested due to automatic review settings April 15, 2026 01:02
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 (from CGALConfigVersion.cmake) to preserve full version strings with suffixes.
  • For tarball builds, extend the version.h regex parsing to include an optional pre-release suffix.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Documentation/doc/CMakeLists.txt Outdated
…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
@RajdeepKushwaha5 RajdeepKushwaha5 force-pushed the fix/cgal-doc-version-beta branch from 1e93beb to 2c2b21a Compare April 15, 2026 01:16
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

Comment thread Documentation/doc/CMakeLists.txt
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.

Wrong value of CGAL_DOC_VERSION in beta releases (Broken links to examples of (beta) releases)

2 participants