idiap_devtools.gitlab.release¶
Utilities to needed to release packages.
Functions
|
Find the name of the latest tag for a given package in the format '#.#.#'. |
|
Return the next version of this package to be tagged. |
|
Release a package. |
|
Update (via a commit) files of a given gitlab package, directly on the default project branch. |
|
Wait for the latest pipeline to finish building via |
- idiap_devtools.gitlab.release.get_latest_tag_name(gitpkg)[source]¶
Find the name of the latest tag for a given package in the format ‘#.#.#’.
- idiap_devtools.gitlab.release.get_next_version(gitpkg, bump)[source]¶
Return the next version of this package to be tagged.
- Parameters:
- Return type:
- Returns:
The new version of the package (to be tagged)
- Raises:
ValueError – if the latest tag retrieve from the package does not: conform with the subset of PEP440 we use (e.g. “v1.2.3b1”).
- idiap_devtools.gitlab.release.update_files_at_default_branch(gitpkg, files_dict, message, dry_run)[source]¶
Update (via a commit) files of a given gitlab package, directly on the default project branch.
- idiap_devtools.gitlab.release.wait_for_pipeline_to_finish(gitpkg, pipeline_id)[source]¶
Wait for the latest pipeline to finish building via
sleep()
.This function pauses the script until pipeline completes either successfully or with error.
- idiap_devtools.gitlab.release.release_package(gitpkg, tag_name, tag_comments, dry_run=False)[source]¶
Release a package.
The provided tag will be annotated with a given list of comments. Files such as
README.md
andpyproject.toml
will be updated according to the release procedures.- Parameters:
- Return type:
- Returns:
The (integer) pipeline identifier, or None, if a pipeline was not actually started (e.g.
dry_run
is set toTrue
)