aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@alpinelinux.org>2020-01-13 23:28:13 +0100
committerCarlo Landmeter <clandmeter@alpinelinux.org>2020-01-17 10:57:36 +0100
commit4be94cb83ebc28d39e17c042bfe1e8755b45fb5c (patch)
tree225c1aeb0fb1c68e0df69edf8bb5eae951a412ab
parent7215f7a6723e8840c5ef55d07e88e57a6f24d979 (diff)
downloaddocker-abuild-4be94cb83ebc28d39e17c042bfe1e8755b45fb5c.tar.bz2
docker-abuild-4be94cb83ebc28d39e17c042bfe1e8755b45fb5c.tar.xz
use git symbolic-ref to get branch name
-rwxr-xr-xdabuild.in3
1 files changed, 1 insertions, 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};;