Skip to content

Commit

Permalink
Update docs conf.py to auto update package version from git
Browse files Browse the repository at this point in the history
  • Loading branch information
KolinGuo committed Apr 4, 2024
1 parent 6232eb7 commit 02349d1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,18 @@

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
import os
import re

project = "mplib"
author = "Minghua Liu, Jiayuan Gu, Kolin Guo, Xinsong Lin"
copyright = f"2021-2024, {author}. All rights reserved."
release = "0.1.0"
release = "+git.".join(
re.findall(
"^v(.*)-[0-9]+-g(.*)", os.popen("git describe --abbrev=8 --tags").read().strip()
)[0]
) # tag-commithash
version = release

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

0 comments on commit 02349d1

Please sign in to comment.