From 4be94cb83ebc28d39e17c042bfe1e8755b45fb5c Mon Sep 17 00:00:00 2001 From: Carlo Landmeter Date: Mon, 13 Jan 2020 23:28:13 +0100 Subject: use git symbolic-ref to get branch name --- dabuild.in | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dabuild.in b/dabuild.in index 78ec170..a05c1bd 100755 --- a/dabuild.in +++ b/dabuild.in @@ -58,8 +58,7 @@ _DOCKER=$DABUILD_DOCKER if [ "$DABUILD_VERSION" ]; then ALPINE_RELEASE=$DABUILD_VERSION else - APORTS_BRANCH=$(git status | head -1) - APORTS_BRANCH="${APORTS_BRANCH##*[ /]}" + APORTS_BRANCH=$(git symbolic-ref --short -q HEAD) case $APORTS_BRANCH in [[:digit:]].[[:digit:]]-stable) ALPINE_RELEASE=${APORTS_BRANCH%-stable};; -- cgit v1.2.3