Skip to content

Commit

Permalink
Simplify version format
Browse files Browse the repository at this point in the history
This package is too small to have a proper release cycle. Therefore
every commit to master will be released according to samantic versioning.
  • Loading branch information
codingjoe committed Jan 7, 2017
1 parent 6431414 commit b2a4f35
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions health_check/__init__.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
# -*- coding: utf-8 -*-
# Used by setup.py, so minimize top-level imports.

__version_info__ = {
'major': 1,
'minor': 3,
'micro': 0,
'releaselevel': 'final',
'serial': 0
}
VERSION = (1, 3, 0)

default_app_config = 'health_check.apps.HealthCheckConfig'

Expand All @@ -24,14 +18,4 @@ def autodiscover():
autodiscover_modules('plugin_health_check', register_to=plugin_dir)


def get_version(short=False):
assert __version_info__['releaselevel'] in ('alpha', 'beta', 'final')
vers = ["%(major)i.%(minor)i" % __version_info__, ]
if __version_info__['micro']:
vers.append(".%(micro)i" % __version_info__)
if __version_info__['releaselevel'] != 'final' and not short:
vers.append('%s%i' % (__version_info__['releaselevel'][0], __version_info__['serial']))
return ''.join(vers)


__version__ = get_version()
__version__ = ".".join(str(i) for i in VERSION)

0 comments on commit b2a4f35

Please sign in to comment.