Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
FSL
fslpy
Commits
b2454c54
Commit
b2454c54
authored
Jun 02, 2017
by
Paul McCarthy
🚵
Browse files
Make version parsing backwards compatible with now-obsolete letter-hotfix
convention
parent
b9e9d64c
Changes
2
Hide whitespace changes
Inline
Side-by-side
doc/contributing.rst
View file @
b2454c54
...
...
@@ -24,23 +24,6 @@ Development model
- Coding conventions are adhered to (unless there is good reason not to).
Releases
--------
A separate branch is created for each release. The name of the branch is
``v[release]``, where ``[release]`` is the ``major.minor`` version number (see
below). For example, the branch name for release ``1.0`` would be ``v1.0``.
Hotfixes may be added to these release branches. Hotfixes should be merged
into the master branch, and then cherry-picked onto the release branch(es).
Every release (including hotfixes) is also tagged with its version number.
For example, the first commit in the ``v1.0`` branch would also be tagged with
``1.0``. A maintenance release to the ``v1.0`` branch would be tagged with
``1.0.1``.
Version number
--------------
...
...
@@ -48,7 +31,7 @@ Version number
The ``fslpy`` version number roughly follows `semantic versioning
<http://semver.org/>`_ rules, so that dependant projects are able to perform
compatibility testing. The full version number string consists of three
numbers:
numbers:
:
major.minor.patch
...
...
@@ -62,6 +45,27 @@ numbers:
backwards-incompatible changes.
Releases
--------
A separate branch is created for each **minor** release. The name of the
branch is ``v[major.minor]``, where ``[major.minor]`` is the first two
components of the release version number (see below). For example, the branch
name for minor release ``1.0`` would be ``v1.0``.
Patches and hotfixes may be added to these release branches. These should be
merged into the master branch, and then cherry-picked onto the release
branch(es).
Every release is also tagged with its full version number. For example, the
first release off the ``v1.0`` branch would be tagged with ``1.0.0``.
Maintenance release to the ``v1.0`` branch would be tagged with ``1.0.1``,
``1.0.2``, etc.
Testing
-------
...
...
fsl/version.py
View file @
b2454c54
...
...
@@ -28,6 +28,10 @@ which roughly obeys the Semantic Versioning conventions (http://semver.org/):
which primarily involve bug-fixes and minor changes.
"""
import
string
__version__
=
'1.0.0'
"""Current version number, as a string. """
...
...
@@ -44,9 +48,16 @@ def parseVersionString(versionString):
# Major, minor, and point
# version are always numeric
major
,
minor
,
point
=
[
int
(
c
)
for
c
in
components
]
major
,
minor
,
point
=
[
c
for
c
in
components
]
# Early versions of FSLeyes
# used a letter at the end
# to denote a hotfix release.
# Don't break if we get one
# of these old version numbers.
point
=
point
.
strip
(
string
.
ascii_letters
)
return
major
,
minor
,
point
return
[
int
(
c
)
for
c
in
[
major
,
minor
,
point
]]
def
compareVersions
(
v1
,
v2
,
ignorePoint
=
False
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment