Skip to content

Commit

Permalink
fix(release-version): fixed 141 exist status from pipe when getting f…
Browse files Browse the repository at this point in the history
…irst line of long git history
  • Loading branch information
Rastusik committed Apr 17, 2023
1 parent 3624f41 commit 5297ddd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion release-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ GH_TOKEN="${GH_TOKEN:?"Provide \"GH_TOKEN\" variable with GitHub Personal Access
git config user.name "${GH_COMMITER_NAME}"
git config user.email "${GH_COMMITER_EMAIL}"

GIT_COMMIT_MESSAGE_FIRST_LINE="$(git log -1 --pretty=%B | head -n 1)"
GIT_COMMIT_MESSAGE_FIRST_LINE="$(git show-branch --no-name HEAD)"
GIT_COMMIT_MESSAGE_RELEASE_COMMIT_MATCHED="$(echo "$GIT_COMMIT_MESSAGE_FIRST_LINE" | sed -E 's/^chore\(release\)\: v([a-zA-Z0-9\.\-]+) \:tada\:/\1/')"
# If sed matches, it means it is a release commit, otherwise strings should be equal
if [[ "$GIT_COMMIT_MESSAGE_FIRST_LINE" != "$GIT_COMMIT_MESSAGE_RELEASE_COMMIT_MATCHED" ]]; then
Expand Down

0 comments on commit 5297ddd

Please sign in to comment.