From 87d27eb1d73a7ecb1dc4bd388f537247f46aa745 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 17 Jan 2025 10:34:24 +0100 Subject: [PATCH] ci-automation/image-changes: Fix fetching LTS version When cutting a new LTS major release, we should fetch the current LTS major release. For that, using the "current" symlink is enough - fetching "lts-info" won't give us good results (either there won't be an entry for the new major version or there won't be a "current-${year}" symlink yet to follow). --- ci-automation/image_changes.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ci-automation/image_changes.sh b/ci-automation/image_changes.sh index c6a2c34882..a153b7c44f 100644 --- a/ci-automation/image_changes.sh +++ b/ci-automation/image_changes.sh @@ -362,7 +362,14 @@ function prepare_env_vars_and_params_for_release() { new_channel="${ppfr_channel}" if [[ ${new_channel} = 'lts' ]]; then - new_channel_prev_version=$(lts_channel_version "${ppfr_version_id%%.*}" "${board}") + local minor_patch=${ppfr_version_id#*.} + if [[ ${minor_patch} = 3.0 && -z ${ppfr_build_id} ]]; then + # We are cutting a new major release for LTS channel. In + # such case get the current LTS release version. + new_channel_prev_version=$(channel_version "${new_channel}" "${board}") + else + new_channel_prev_version=$(lts_channel_version "${ppfr_version_id%%.*}" "${board}") + fi else new_channel_prev_version=$(channel_version "${new_channel}" "${board}") fi