Skip to content

Commit

Permalink
Update versioning...
Browse files Browse the repository at this point in the history
  • Loading branch information
EvieePy committed Jan 6, 2019
1 parent a3057bd commit 2016fdc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 28 deletions.
28 changes: 1 addition & 27 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,32 +40,7 @@
requirements.append('sphinxcontrib-websupport')
requirements.append('Pygments')

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

if not version:
raise RuntimeError('version is not set')

if version.endswith(('a', 'b', 'rc')):
# append version identifier based on commit count
try:
import subprocess
p = subprocess.Popen(['git', 'rev-list', '--count', 'HEAD'],
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
out, err = p.communicate()
if out:
version += out.decode('utf-8').strip()
p = subprocess.Popen(['git', 'rev-parse', '--short', 'HEAD'],
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
out, err = p.communicate()
if out:
version += '+' + out.decode('utf-8').strip()
except Exception:
pass

if not version:
raise RuntimeError('version is not set')
version = '0.1.70'

readme = ''
with open('README.rst') as f:
Expand All @@ -82,7 +57,6 @@
include_package_data=True,
install_requires=requirements,
classifiers=[
'Development Status :: 1 - Alpha',
'License :: OSI Approved :: MIT License',
'Intended Audience :: Developers',
'Natural Language :: English',
Expand Down
2 changes: 1 addition & 1 deletion wavelink/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
__author__ = 'EvieePy'
__license__ = 'MIT'
__copyright__ = 'Copyright 2019 (c) EvieePy'
__version__ = '0.0.70a'
__version__ = '0.1.70a'

from .client import Client
from .errors import *
Expand Down

0 comments on commit 2016fdc

Please sign in to comment.