Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Allow x.y.z version numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
vbraun committed Jan 15, 2017
1 parent bd94c31 commit 01cb18f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions git_trac/releasemgr/version_string.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@


class VersionString(object):

V_BETA = re.compile(r'^[0-9]+\.[0-9]+\.beta[0-9]+$')
V_RC = re.compile(r'^[0-9]+\.[0-9]+\.rc[0-9]+$')
V_STABLE = re.compile(r'^[0-9]+\.[0-9]+$')

V_BETA = re.compile(r'^[0-9]+\.[0-9]+\.beta[0-9]+$')
V_RC = re.compile(r'^[0-9]+\.[0-9]+\.rc[0-9]+$')
V_STABLE = re.compile(r'^[0-9]+\.[0-9]+$')
V_STABLE2 = re.compile(r'^[0-9]+\.[0-9]+\.[0-9]+$')

def __init__(self, version):
self.version = version
Expand Down Expand Up @@ -59,7 +60,8 @@ def is_stable(self):
sage: VersionString('6.8').is_stable()
True
"""
return bool(self.V_STABLE.match(self.version))
return bool(self.V_STABLE.match(self.version) or
self.V_STABLE2.match(self.version))

def is_devel(self):
"""
Expand Down

0 comments on commit 01cb18f

Please sign in to comment.