From 8bee407e3461c260bce689ed909bdfdb3a4cf23c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire?= <gregoire.kubler@proton.me> Date: Wed, 27 Nov 2024 10:33:24 +0100 Subject: [PATCH] fix : indentation block --- .gitlab/ci/download/select_jobs.gitlab-ci.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.gitlab/ci/download/select_jobs.gitlab-ci.yml b/.gitlab/ci/download/select_jobs.gitlab-ci.yml index 2073666..23aa27b 100644 --- a/.gitlab/ci/download/select_jobs.gitlab-ci.yml +++ b/.gitlab/ci/download/select_jobs.gitlab-ci.yml @@ -99,13 +99,18 @@ | reverse ' <<<$(curl -s "$DEP_API_URL/repository/tags?per_page=100")) - if [[ $(jq length <<< $DEP_TAGS) == 0 ]]; then - echo "No tag found for $DEP_NAME at url $DEP_API_URL/repository/tags?per_page=100" - echo "Leaving early." - exit 1 - fi + if [[ $(jq length <<< $DEP_TAGS) == 0 ]]; then + echo "No tag found for $DEP_NAME at url $DEP_API_URL/repository/tags?per_page=100" + echo "Leaving early." + exit 1 + fi - echo "Looking for latest fix release corresponding to minor release : v$TAG_MAJOR.$TAG_MINOR.*" + echo "Looking for latest fix release corresponding to minor release : v$TAG_MAJOR.$TAG_MINOR.*" + SELECTED_DEPS_TAGS=$(jq --arg major "$TAG_MAJOR" \ + --arg minor "$TAG_MINOR" \ + 'map(select(.name | startswith("v\($major).\($minor).")))' <<< "$DEP_TAGS") + if [[ $(jq length <<< $SELECTED_DEPS_TAGS) == 0 ]]; then + echo "No release v$TAG_MAJOR.$TAG_MINOR.* found. Looking for latest minor release v$TAG_MAJOR.*.* in $DEP_NAME." SELECTED_DEPS_TAGS=$(jq --arg major "$TAG_MAJOR" \ --arg minor "$TAG_MINOR" \ 'map(select(.name | startswith("v\($major).\($minor).")))' <<< "$DEP_TAGS") -- GitLab