Skip to content

Commit

Permalink
cleaner release printing in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
orbeckst committed Aug 5, 2021
1 parent 7047b3d commit 8462759
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion doc/sphinx/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,23 @@

# The short X.Y version.
version = '.'.join(packageversion.split('.')[:2])

# The full version, including alpha/beta/rc tags.
release = packageversion
##release = packageversion
#
# clean up for RTD:
# 0.7.0+5.g8afad4b.dirty --> 0.7.0+5.g8afad4b
# 0.7.0+0.g43485dd.dirty --> 0.7.0
try:
ver, rc = packageversion.split("+")
except ValueError:
ver, rc = packageversion, None

if not rc or rc.startswith('0'):
release = ver
else:
release = ver + "+" + rc.replace(".dirty", "")


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

0 comments on commit 8462759

Please sign in to comment.