Skip to content

Commit a1f43ed

Browse files
author
Rastusik
committed
fix(release-version): fixed 141 exist status from pipe when getting first line of long git history
1 parent 3624f41 commit a1f43ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

release-version.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ GH_TOKEN="${GH_TOKEN:?"Provide \"GH_TOKEN\" variable with GitHub Personal Access
3232
git config user.name "${GH_COMMITER_NAME}"
3333
git config user.email "${GH_COMMITER_EMAIL}"
3434

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

0 commit comments

Comments
 (0)