Skip to content

Commit 376a737

Browse files
committed
GH-611: [Docs] Detect version from pom.xml
Fixes GH-611.
1 parent 34e2b08 commit 376a737

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

docs/source/conf.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,17 @@
2323
# -- Project information -----------------------------------------------------
2424
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
2525

26+
import pathlib
27+
import re
28+
2629
project = 'arrow-java'
2730
copyright = '2025, Apache Arrow Developers'
2831
author = 'Apache Arrow Developers'
29-
release = '18.1.0'
32+
33+
top_level_pom_xml = pathlib.Path(__file__).parents[2] / "pom.xml"
34+
release = re.findall("^ <version>(.+?)</version>",
35+
top_level_pom_xml.read_text(),
36+
re.MULTILINE)[0]
3037

3138
# -- General configuration ---------------------------------------------------
3239
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

0 commit comments

Comments
 (0)