Skip to content

Commit 2f44775

Browse files
Copilotpandafy
andcommitted
Bump version to 1.3.0a for next development cycle
Co-authored-by: pandafy <32094433+pandafy@users.noreply.github.com>
1 parent c3b2c76 commit 2f44775

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

openwisp_utils/__init__.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
VERSION = (1, 2, 0, "final")
1+
VERSION = (1, 3, 0, "alpha")
22
__version__ = VERSION # alias
33

44

55
def get_version():
66
version = "%s.%s" % (VERSION[0], VERSION[1])
7-
if VERSION[2]:
7+
# For non-final versions, always include patch version
8+
if VERSION[2] or (len(VERSION) > 3 and VERSION[3] != "final"):
89
version = "%s.%s" % (version, VERSION[2])
910
if VERSION[3:] == ("alpha", 0):
1011
version = "%s pre-alpha" % version
@@ -14,5 +15,9 @@ def get_version():
1415
rev = VERSION[4]
1516
except IndexError:
1617
rev = 0
17-
version = "%s%s%s" % (version, VERSION[3][0:1], rev)
18+
# Don't append revision number if it's 0
19+
if rev == 0:
20+
version = "%s%s" % (version, VERSION[3][0:1])
21+
else:
22+
version = "%s%s%s" % (version, VERSION[3][0:1], rev)
1823
return version

0 commit comments

Comments
 (0)