Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.admin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
bob
bob.admin
Commits
c4f291e2
Commit
c4f291e2
authored
7 years ago
by
Pavel KORSHUNOV
Browse files
Options
Downloads
Patches
Plain Diff
better tags sorting, update help docs
parent
5a6ea947
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!85
Correcting release script: sorting tags, corrected version bump, updated help docs
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
release/release_bob.py
+17
-15
17 additions, 15 deletions
release/release_bob.py
with
17 additions
and
15 deletions
release/release_bob.py
+
17
−
15
View file @
c4f291e2
...
@@ -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
...
...
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