Permalink
Browse files

Automagically determine version for readthedocs from the version.rb file

  • Loading branch information...
cheerfulstoic committed Jan 22, 2016
1 parent 0c958bb commit 695576794a3a05169e34b15aaec43422a2aa087d
Showing with 9 additions and 4 deletions.
  1. +8 −3 docs/conf.py
  2. +1 −1 lib/neo4j/version.rb
View
@@ -59,9 +59,14 @@
# built documents.
#
# The short X.Y version.
version = '6.1'
# The full version, including alpha/beta/rc tags.
release = '6.1.x'
f = open('../lib/neo4j/version.rb')
contents = f.read()
version_line = filter(lambda x:'VERSION' in x, contents.split("\n"))
import re
pattern = re.compile("VERSION\s*=\s*'([^']+)'")
release = pattern.search(contents).group(1) # e.g. 6.1.0 or 6.1.0.rc.1
version = '.'.join(release.split('.')[0:2]) # e.g. 6.1
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
View
@@ -1,3 +1,3 @@
module Neo4j
VERSION = '6.1.3'
VERSION = '7.0.0.beta.1'
end

2 comments on commit 6955767

@subvertallchris

This comment has been minimized.

Show comment
Hide comment
@subvertallchris
Member

subvertallchris replied Jan 22, 2016

🎉

@jessmartin

This comment has been minimized.

Show comment
Hide comment
@jessmartin

jessmartin Jan 28, 2016

Contributor

Nice, @cheerfulstoic! 😎

Contributor

jessmartin replied Jan 28, 2016

Nice, @cheerfulstoic! 😎

Please sign in to comment.