mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-28 19:54:35 +00:00
ci: Add get_latest_patch_release_from_a_github_project()
This function will help us to get the latest patch release from a GitHub project. The idea behind this function is that we don't have to keep updating versions.yaml that frequently (or worse, have it outdated as it currently is), and always test against the latest patch release of a given project's version that we care about. Although right now this is not used anywhere, this will be used with the coming cri-containerd tests, which will be part of this series. Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
parent
6742f3a898
commit
788c562a95
@ -351,3 +351,12 @@ function get_from_kata_deps() {
|
||||
[ "$result" = "null" ] && result=""
|
||||
echo "$result"
|
||||
}
|
||||
|
||||
# project: org/repo format
|
||||
# base_version: ${major}.${minor}
|
||||
function get_latest_patch_release_from_a_github_project() {
|
||||
project="${1}"
|
||||
base_version="${2}"
|
||||
|
||||
curl --silent https://api.github.com/repos/${project}/releases | jq -r .[].tag_name | grep "^${base_version}.[0-9]*$" -m1
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user