Skip to content

Commit

Permalink
dsl-ac68u: build: fix - picks latest previous tag in case of releases
Browse files Browse the repository at this point in the history
  • Loading branch information
zaloisio committed Jan 10, 2020
1 parent f13a4bd commit fe954b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down

0 comments on commit fe954b0

Please sign in to comment.