From 162b9c9f1992021d61019da21f3b3e33674d3919 Mon Sep 17 00:00:00 2001 From: Hiroto Funakoshi Date: Tue, 23 Apr 2024 14:37:04 +0900 Subject: [PATCH] fix: tag sort bug (#273) Signed-off-by: hlts2 --- .github/workflows/_check-version.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/_check-version.yaml b/.github/workflows/_check-version.yaml index d09a73db..52822ab8 100644 --- a/.github/workflows/_check-version.yaml +++ b/.github/workflows/_check-version.yaml @@ -54,8 +54,8 @@ jobs: - name: Get version difference id: get_version_diff run: | - VALD_TAG_LIST=$(curl -s "${VALD_TAG_LIST_API_URL}" | jq -r '.[].name' | grep -E '^v?[0-9]+\.[0-9]+\.[0-9]+$') - CLIENT_TAG_LIST=$(git tag --sort=-v:refname | grep -E '^v?[0-9]+\.[0-9]+\.[0-9]+$' | sed '/^v/! s/^/v/' | sort -r) + VALD_TAG_LIST=$(curl -s "${VALD_TAG_LIST_API_URL}" | jq -r '.[].name' | grep -E '^v?[0-9]+\.[0-9]+\.[0-9]+$' | sort -rV) + CLIENT_TAG_LIST=$(git tag --sort=-v:refname | grep -E '^v?[0-9]+\.[0-9]+\.[0-9]+$' | sed '/^v/! s/^/v/' | sort -rV) # We cannot store multiple rows of values in "GITHUB_OUTPUT", so convert them to a single line. TAG_DIFF_LIST=$(diff -u <(echo "${CLIENT_TAG_LIST}") <(echo "${VALD_TAG_LIST}") | grep '^+' | grep -v '^+++' | sed 's/^+//' | tac)