From 2f4ca153f01a92d5057936c3222ffe3d1cbef08d Mon Sep 17 00:00:00 2001 From: Antonio Aloisio Date: Fri, 10 Jan 2020 08:56:40 +0100 Subject: [PATCH] dsl-ac68u: build: fix - picks latest previous tag in case of releases --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 62c8c25aa0f..8016fcf3a69 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -30,7 +30,7 @@ jobs: REGXP_TO_MATCH=.*gnuton.* if [[ ${CIRCLE_TAG} =~ ${REGXP_TO_MATCH} ]]; then CURRENT_TAG=${CIRCLE_TAG} - PREVIOUS_TAG=$(git tag --sort=-version:refname | grep -vE "snapshot|beta|alpha" | grep ${REGXP_TO_MATCH} | head -n 2 | sed -n 2p) + PREVIOUS_TAG=$(git tag --sort=-version:refname | grep -vE "snapshot|beta|alpha|${CIRCLE_TAG}" | grep ${REGXP_TO_MATCH} | head -n 1) echo "Generating logs between the tags ${PREVIOUS_TAG} and ${CURRENT_TAG}" echo "Changes from the latest stable gnuton build (${PREVIOUS_TAG}):" > "${CHANGELOG_FILE}" git log ${PREVIOUS_TAG}...${CURRENT_TAG} --pretty=format:'* %s' --reverse | grep -vE 'Merge branch|ci:|Bump' >> "${CHANGELOG_FILE}"