Skip to content

Commit 39ff38d

Browse files
committed
🔧 Use git tag for versioning the docs
1 parent 269dacf commit 39ff38d

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

docs/conf.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,15 @@
2121

2222
# -- Project information -----------------------------------------------------
2323

24+
import os
25+
import re
26+
2427
project = "Python for Data Science"
25-
copyright = "2019–2024, Veit Schiele"
2628
author = "Veit Schiele"
29+
copyright = f"2019–2024, {author}"
2730

2831
# The full version, including alpha/beta/rc tags
29-
release = "1.0.0"
32+
release = re.sub("^v", "", os.popen("git describe --abbrev=0").read().strip())
3033

3134

3235
# -- General configuration ---------------------------------------------------
@@ -86,8 +89,8 @@
8689
# documentation.
8790
#
8891
# Change default HTML title
89-
html_title = "Python for Data Science 1.0.0"
90-
#
92+
html_title = f"{project} {release}"
93+
9194
# html_theme_options = {}
9295
# html_sidebars = {}
9396

0 commit comments

Comments
 (0)