Skip to content

Commit 570f293

Browse files
authored
Merge pull request #1922 from Conengmo/docs-dev-version-number
Use better dev version number in docs
2 parents 6c0c20e + 888ef6a commit 570f293

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

.github/workflows/deploy-docs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
1719

1820
- name: Setup Micromamba env
1921
uses: mamba-org/setup-micromamba@v1

docs/conf.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,10 @@
5757
# |version| and |release|, also used in various other places throughout the
5858
# built documents.
5959

60-
# The full version, including alpha/beta/rc tags.
61-
6260
import folium
6361

6462
version = release = folium.__version__
65-
if "+" in version:
66-
version, remainder = release.split("+")
67-
if not remainder.startswith("0"):
68-
version = version + ".dev+" + remainder.split(".")[0]
63+
print(f"Version: {version}")
6964

7065
# The language for content autogenerated by Sphinx. Refer to documentation
7166
# for a list of supported languages.
@@ -114,7 +109,7 @@
114109
html_theme_options = {
115110
"switcher": {
116111
"json_url": "https://python-visualization.github.io/folium/latest/_static/switcher.json",
117-
"version_match": "latest" if ".dev+" in version else version,
112+
"version_match": "latest" if ".dev" in version else version,
118113
},
119114
"navbar_start": ["navbar-logo", "version-switcher"],
120115
"footer_start": ["version", "copyright", "sphinx-version", "theme-version"],

0 commit comments

Comments
 (0)