Skip to content

Commit f1b3122

Browse files
authored
Fix git log inconsistency on Azure (#739)
Git log works differently for PR and for Master build. Trying to fix it by simple condition. Resolves: OLPEDGE-1753 Signed-off-by: Yaroslav Stefinko <[email protected]>
1 parent fa96819 commit f1b3122

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/misc/commit_checker.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424

2525
# Saving whole commit message into file for reading below
2626
set -x
27-
branch_name="$(git symbolic-ref HEAD 2>/dev/null)" || branch_name="branch" # detached HEAD
28-
branch_name=${branch_name##refs/heads/}
27+
git branch
28+
branch_name="$(git branch | grep \* | cut -d ' ' -f2)" || branch_name="master"
2929
if [ "$branch_name" = "master" ]; then
3030
echo "`git log --pretty=format:'%B' -1`" >> commit.log
3131
else

0 commit comments

Comments
 (0)