From 38457a2d2a80cb97566ee9ac581aca362f2c8e26 Mon Sep 17 00:00:00 2001 From: Aleksandr Chikovani Date: Sun, 27 Aug 2023 21:43:55 -0400 Subject: [PATCH] feat: blah --- .github/workflows/docker-publish.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 00d873556..f076b4c9b 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -61,16 +61,15 @@ jobs: else # Tags found if [[ "$CURRENT_BRANCH" == "development" ]]; then - CURRENT_VERSION=$(git describe --tags --abbrev=0) + CURRENT_VERSION=$(git tag | sort -V | tail -1) NEXT_VERSION=$(bump_version "${CURRENT_VERSION}" "${CURRENT_BRANCH}") elif [[ "${CURRENT_BRANCH}" == release-* ]]; then # For release branch with tags, bump patch version, e.g. v2.3.4 -> v2.3.5 - CURRENT_VERSION=$(git describe --tags --abbrev=0 --match "v${CURRENT_BRANCH#"release-"}.*" 2>/dev/null) + CURRENT_VERSION=$(git tag | grep "^v${CURRENT_BRANCH#'release-'}.*" | sort -V | tail -1) if [[ -n "$CURRENT_VERSION" ]]; then NEXT_VERSION=$(bump_version "${CURRENT_VERSION}" "${CURRENT_BRANCH}") else # If no tags match the release branch, set the next version to release number with 0 patch version, e.g. v-0.1.0 - BRANCH_VERSION=${CURRENT_BRANCH#"release-"} NEXT_VERSION="v${BRANCH_VERSION}.0" fi else