From c57cf73219389ad135bfc9433611be6afaf042b4 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Mon, 5 Mar 2018 21:54:30 +0000 Subject: [PATCH] Try symbolic-ref to get branch name --- contrib/semver/name.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/semver/name.sh b/contrib/semver/name.sh index 82527596..eea8ee4b 100644 --- a/contrib/semver/name.sh +++ b/contrib/semver/name.sh @@ -1,7 +1,7 @@ #!/bin/sh # Get the branch name -BRANCH=$(git name-rev --name-only HEAD 2>/dev/null) +BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null) # Check if the branch name is not master if [ "$BRANCH" = "master" ]; then