Skip to content

Commit

Permalink
Move to version.txt for sharing with doc/conf.py and use with zest.re…
Browse files Browse the repository at this point in the history
…leaser. [skip ci]
  • Loading branch information
jamadden committed Jun 28, 2016
1 parent 856caa4 commit 591979d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
11 changes: 8 additions & 3 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,15 @@
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = u'2.0'

# The full version, including alpha/beta/rc tags.
release = u'2.0.0b1'
import io
with io.open('../version.txt') as f:
release = f.read().strip()

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


# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
##############################################################################
"""A backend for ZODB that stores pickles in a relational database."""

VERSION = "2.0.0b1.dev0"

# The choices for the Trove Development Status line:
# Development Status :: 5 - Production/Stable
Expand Down Expand Up @@ -46,6 +45,8 @@ def read_file(*path):
result = f.read()
return result

VERSION = read_file('version.txt').strip()

tests_require = [
'mock',
'zope.testing',
Expand Down
1 change: 1 addition & 0 deletions version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.0.0b1.dev0

0 comments on commit 591979d

Please sign in to comment.