Skip to content
Snippets Groups Projects
Commit c4f291e2 authored by Pavel KORSHUNOV's avatar Pavel KORSHUNOV
Browse files

better tags sorting, update help docs

parent 5a6ea947
No related branches found
No related tags found
1 merge request!85Correcting release script: sorting tags, corrected version bump, updated help docs
......@@ -23,28 +23,28 @@ This script can also be used to release a single package.
`IMPORTANT`: there are some considerations that needs to be taken
into account **before** you release a new version of a package:
* In the changelog file, write the name of this package and write the last tag.
For the tag name, you can either indicate `patch` to `minor` or `major`,
and the package will be then released with either patch, minor, or major version bump.
Alternatively, you can specify the version name directly but be careful that it is higher
than the last release tag of this package.
Then, under the desired new tag version of the package, please write down the changes that are applied
to the package between the last released version and this version. This
changes are written to release tags of packages in the Gitlab interface.
For an example look at: https://gitlab.idiap.ch/bob/bob.extension/tags
* In the changelog file:
- write the name of this package and write the last tag.
For the tag name, you can either indicate `patch`, `minor` or `major`,
and the package will be then released with either patch, minor, or major version bump.
- Alternatively, you can specify the version name directly but be careful that it is higher
than the last release tag of this package.
Make sure that the version that you are trying to release is not already released.
Also, make sure you follow semantic versions: http://semver.org.
- Then, under the desired new tag version of the package, please write down the changes that are applied
to the package between the last released version and this version. This
changes are written to release tags of packages in the Gitlab interface.
For an example look at: https://gitlab.idiap.ch/bob/bob.extension/tags
* Make sure all the tests for the package are passing.
* Make sure the documentation is building with the following command:
``sphinx-build -aEWn doc sphinx``
* Make sure all changes are committed to the git repository and pushed.
* Make sure the documentation badges in README.rst are pointing to:
https://www.idiap.ch/software/bob/docs/bob/...
* Make sure all changes are committed to the git repository and pushed.
* For database packages, make sure that the '.sql3' file or other
metadata files have been generated (if any).
* Make sure bob.nightlies is green after the changes are submitted if the
package is a part of the nightlies.
* Make sure you follow semantic versions: http://semver.org
* Make sure that the `stable` version that you are trying to release is not
already released.
* If your package depends on an unreleased version of another Bob package,
you need to release that package first.
......@@ -78,7 +78,7 @@ from docopt import docopt
import gitlab
import datetime
import re
from distutils.version import StrictVersion as Version
from distutils.version import StrictVersion
import numpy
import time
......@@ -122,8 +122,10 @@ def get_latest_tag_name(gitpkg):
return None
# create list of tags' names but ignore the first 'v' character in each name
tag_names = [tag.name[1:] for tag in latest_tags]
print(tag_names)
# sort them correctly according to each subversion number
tag_names.sort(key=lambda s: [int(u) for u in s.split('.')])
tag_names.sort(key=StrictVersion)
print(tag_names)
# take the last one, as it is the latest tag in the sorted tags
latest_tag_name = tag_names[-1]
return latest_tag_name
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment