Skip to content

Commit

Permalink
Add semantic release settings
Browse files Browse the repository at this point in the history
  • Loading branch information
relekang committed Aug 2, 2015
1 parent 4e0b088 commit 21298e1
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
2 changes: 2 additions & 0 deletions rmoq/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
from .base import Mock
from rmoq.backends import FileStorageBackend, RmoqStorageBackend, MemcachedStorageBackend

__version__ = '0.4.1'

_mock = Mock()

__all__ = [
__version__,
RmoqStorageBackend,
FileStorageBackend,
MemcachedStorageBackend,
Expand Down
6 changes: 6 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
[wheel]
universal = 1

[semantic_release]
version_variable=rmoq/__init__.py:__version__
major_tag=[major]
minor_tag=[minor]
patch_tag=[patch]
17 changes: 16 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import re
import sys
import codecs
from os import path

Expand All @@ -8,9 +10,22 @@ def read(*parts):
file_path = path.join(path.dirname(__file__), *parts)
return codecs.open(file_path, encoding='utf-8').read()

with open('rmoq/__init__.py', 'r') as fd:
version = re.search(
r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
fd.read(),
re.MULTILINE
).group(1)

try:
from semantic_release import setup_hook
setup_hook(sys.argv)
except ImportError:
pass

setup(
name='rmoq',
version='0.4.1',
version=version,
url='http://github.com/relekang/rmoq',
author='Rolf Erik Lekang',
author_email='me@rolflekang.com',
Expand Down

0 comments on commit 21298e1

Please sign in to comment.