Skip to content

Commit

Permalink
fix: add check for previous tag existence in entrypoint.sh (#73)
Browse files Browse the repository at this point in the history
* fix: add check for previous tag existence in entrypoint.sh

* fix: corrected spelling
  • Loading branch information
mauricio-liatrio authored Mar 27, 2024
1 parent 846cb49 commit 0381740
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions conventional-release/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,13 @@ if [ "${DEBUG}" ]; then
flags+=(--debug)
fi

previousVersion=$(git describe --tags --abbrev=0)
output "previousVersion" "${previousVersion}"
#Check to see if a previous tag exists
if previousVersion=$(git describe --tags --abbrev=0 2>/dev/null); then
echo "A previous tag was found"
output "previousVersion" "${previousVersion}"
else
echo "A previous tag was not found"
fi

$GITHUB_ACTION_PATH/node_modules/semantic-release/bin/semantic-release.js "${flags[@]}"

Expand Down

0 comments on commit 0381740

Please sign in to comment.