Skip to content

Commit 060a1b4

Browse files
committed
Use better dev version number in docs
1 parent 4f76a1b commit 060a1b4

1 file changed

Lines changed: 5 additions & 9 deletions

File tree

docs/conf.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
# serve to show the default.
1111

1212
import os
13+
import subprocess
1314
import sys
1415

1516
# Use the currently checked out folium of this folder
@@ -54,15 +55,10 @@
5455
# |version| and |release|, also used in various other places throughout the
5556
# built documents.
5657

57-
# The full version, including alpha/beta/rc tags.
58-
59-
import folium
60-
61-
version = release = folium.__version__
62-
if "+" in version:
63-
version, remainder = release.split("+")
64-
if not remainder.startswith("0"):
65-
version = version + ".dev+" + remainder.split(".")[0]
58+
version = subprocess.check_output(["git", "describe", "--tags"]).decode().strip()
59+
if "-" in version:
60+
version.replace("-", ".dev", 1)
61+
release = version
6662

6763
# The language for content autogenerated by Sphinx. Refer to documentation
6864
# for a list of supported languages.

0 commit comments

Comments
 (0)