Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FSL
fslpy
Commits
b2454c54
Commit
b2454c54
authored
7 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
Make version parsing backwards compatible with now-obsolete letter-hotfix
convention
parent
b9e9d64c
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
doc/contributing.rst
+22
-18
22 additions, 18 deletions
doc/contributing.rst
fsl/version.py
+13
-2
13 additions, 2 deletions
fsl/version.py
with
35 additions
and
20 deletions
doc/contributing.rst
+
22
−
18
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
-------
...
...
This diff is collapsed.
Click to expand it.
fsl/version.py
+
13
−
2
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
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment