From cfa68d83baf8582e1bbcfd2eea1ce155653a7b62 Mon Sep 17 00:00:00 2001 From: Guillaume Date: Thu, 12 Dec 2024 16:02:24 +0100 Subject: [PATCH] [tool] fix latest tag incorrectly points to a lower semver (#2051) --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 33388e21a9..598dbdb851 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -228,9 +228,9 @@ jobs: - run: name: Build Docker image openbas/platform command: | - LATEST_VERSION=$(git describe --tags --abbrev=0) + LATEST_SEMANTIC_VERSION=$(git tag --sort=-v:refname | grep -E '^v?[0-9]+\.[0-9]+\.[0-9]+$' | head -n 1) TAGS="-t openbas/platform:${CIRCLE_TAG}" - [ "$CIRCLE_TAG" = "$LATEST_VERSION" ] && TAGS="$TAGS -t openbas/platform:latest" + [ "$CIRCLE_TAG" = "$LATEST_SEMANTIC_VERSION" ] && TAGS="$TAGS -t openbas/platform:latest" docker buildx build --progress=plain --platform $BUILDX_PLATFORMS -f Dockerfile_circleci $TAGS --push . no_output_timeout: 30m - slack/notify: