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