Skip to content

Commit

Permalink
Merge pull request #1211 from moreati/issue1209
Browse files Browse the repository at this point in the history
docs: Read release version from changelog
  • Loading branch information
moreati authored Jan 9, 2025
2 parents 69b6552 + 1195e39 commit 5ef8db9
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
import re
import sys

sys.path.append('.')

VERSION = '0.3.9'

def changelog_version(path, encoding='utf-8'):
version_pattern = re.compile(
r'^v(?P<version>[0-9]+\.[0-9]+\.[0-9]+)',
re.MULTILINE,
)

with open(path, encoding=encoding) as f:
match = version_pattern.search(f.read())
return match.group('version')


VERSION = changelog_version('changelog.rst')

author = u'Network Genomics'
copyright = u'2021, the Mitogen authors'
Expand Down

0 comments on commit 5ef8db9

Please sign in to comment.