andygrove opened a new pull request, #4030:
URL: https://github.com/apache/datafusion-comet/pull/4030
## Which issue does this PR close?
Closes #.
## Rationale for this change
The installation page lists Maven Central download links with a
`\$COMET_VERSION` placeholder. When the page renders for a snapshot build (e.g.
`0.16.0-SNAPSHOT`) those links point to artifacts that do not exist. Today the
source file carries an inline warning, but the broken links are still shown to
snapshot readers.
This PR introduces a simple conditional-content mechanism so the same source
file can render different blocks for snapshot builds and for released-version
builds, and applies it to the "Using a Published JAR File" section.
## What changes are included in this PR?
- Add `strip_conditional_blocks(root, mode)` to `docs/generate-versions.py`.
It processes `<!-- IF_SNAPSHOT -->` / `<!-- IF_RELEASE -->` blocks terminated
by `<!-- ENDIF -->` in `.md` and `.rst` files under `root`, keeping the block
that matches `mode` and dropping the other. Malformed markers (unclosed opener,
stray `ENDIF`, nested blocks) fail the build with a file and line number.
- Call `strip_conditional_blocks` with `mode="snapshot"` on
`temp/user-guide/latest` and with `mode="release"` on each cloned released
version directory, immediately before the existing `\$COMET_VERSION`
substitution.
- Rewrite the "Using a Published JAR File" section of
`docs/source/user-guide/latest/installation.md`:
- Snapshot builds see a short notice pointing to the "Building from
source" page.
- Released builds see the existing Maven Central download links (with the
now-redundant "these links are not valid for SNAPSHOT" disclaimer removed,
since the snapshot case is handled directly).
## How are these changes tested?
Verified locally by running `docs/build.sh` and confirming the rendered
output contains the snapshot directive in the `latest` user guide and the Maven
links in the released-version user guides, with no conditional markers leaking
into the HTML.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]