Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
fweikert committed May 16, 2024
1 parent 4c32232 commit d3ef72f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/release/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ function __git_commit_subject() {

# Returns the branch name of the current git repository
function git_get_branch() {
# Case 1 works when a release branch was checked out,
# whereas the second case works if we're in "detached HEAD" state,
# which can happen on CI.
git symbolic-ref --short HEAD 2>/dev/null || git branch --remote --contains | cut -d "/" -f2
}

Expand Down

0 comments on commit d3ef72f

Please sign in to comment.