Clean up version numbering and readme/description/docs sharing

This commit is contained in:
medmunds
2013-03-05 15:33:01 -08:00
parent 51d45353ee
commit 9211c74144
4 changed files with 19 additions and 32 deletions

View File

@@ -9,12 +9,10 @@ with open("djrill/_version.py") as f:
def long_description_from_readme(rst):
# Patch up some rest substitution variables (references only - not definitions):
rst = re.sub(r'(?<!\.\. )\|release\|', __version__, rst)
rst = re.sub(r'(?<!\.\. )\|version\|', __minor_version__, rst)
rst = re.sub(r'(?<!\.\. )\|buildstatus\|', "", rst) # hide latest-code Travis status indicator
rst = re.sub(r'(djrill\.readthedocs\.org/\w+)/latest',
r'\1/' + __version__, rst) # freeze docs link to this version
# In release branches, freeze some external links to refer to this X.Y version:
if not "dev" in __version__:
rst = re.sub(r'branch=master', 'branch=v' + __minor_version__, rst) # Travis build status
rst = re.sub(r'/latest', '/v' + __minor_version__, rst) # ReadTheDocs
return rst
with open('LICENSE') as f: