Skip to content

Commit f421c10

Browse files
committed
safe
1 parent 36e1568 commit f421c10

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

.github/workflows/tag-release.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,14 +158,15 @@ jobs:
158158
# Dry run mode: use short git SHA and get next version for summary
159159
VERSION_TAG=$(git rev-parse --short HEAD)
160160
echo "Getting next_version"
161-
NEXT_VERSION=$(grep -i 'The next release version is' semantic-release-output.log | sed -E 's/.* ([[:digit:].]+)$/\1/')
161+
NEXT_VERSION=$(grep -i 'The next release version is' semantic-release-output.log | sed -E 's/.* ([[:digit:].]+)$/\1/' || true)
162+
NEXT_VERSION=${NEXT_VERSION:-UNKNOWN}
162163
echo "got next version"
163164
# disabling shellcheck as replace does not work
164165
# shellcheck disable=SC2001
165166
NEW_VERSION_TAG=$(echo "$TAG_FORMAT" | sed "s/\${version}/$NEXT_VERSION/")
166167
echo "## VERSION TAG : ${VERSION_TAG}" >> "$GITHUB_STEP_SUMMARY"
167168
echo "## NEXT TAG WILL BE : ${NEW_VERSION_TAG}" >> "$GITHUB_STEP_SUMMARY"
168-
if [ -z "${NEXT_VERSION}" ]
169+
if [ "${NEXT_VERSION}" == "UNKNOWN" ]
169170
then
170171
echo "Could not get next tag. Here is the log from semantic-release"
171172
cat semantic-release-output.log

0 commit comments

Comments
 (0)