From bb3f42daffafb497639c2c678f6106ce54523ff3 Mon Sep 17 00:00:00 2001 From: Mike Beattie Date: Thu, 25 Oct 2012 20:31:59 +1300 Subject: altosdroid: more reliable branch detection Signed-off-by: Mike Beattie --- altosdroid/buildinfo.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/altosdroid/buildinfo.sh b/altosdroid/buildinfo.sh index e1b650f8..afd64973 100755 --- a/altosdroid/buildinfo.sh +++ b/altosdroid/buildinfo.sh @@ -22,7 +22,7 @@ buildtz=$(date "+%z") describe=$(git describe --match "$version" --long --always 2>/dev/null || echo '') if [ -n "$describe" ]; then - branch=$(git status -s -b | sed -ne '1s/^## \(.*\)\.\.\..*$/\1/p') + branch=$(git branch | sed -ne 's/^\* //p') commitdetails=$(echo $describe | sed -e "s/^$version-//") commitnum=$(echo $commitdetails | cut -d- -f1) commithash=$(echo $commitdetails | cut -d- -f2) -- cgit v1.2.3 From 56023cf5da9deede9fe627fe327783eceecf08f7 Mon Sep 17 00:00:00 2001 From: Mike Beattie Date: Thu, 25 Oct 2012 20:39:20 +1300 Subject: altosdroid: more restrictive commit no. matching Signed-off-by: Mike Beattie --- altosdroid/buildinfo.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/altosdroid/buildinfo.sh b/altosdroid/buildinfo.sh index afd64973..ac97b7bd 100755 --- a/altosdroid/buildinfo.sh +++ b/altosdroid/buildinfo.sh @@ -24,7 +24,7 @@ describe=$(git describe --match "$version" --long --always 2>/dev/null || echo ' if [ -n "$describe" ]; then branch=$(git branch | sed -ne 's/^\* //p') commitdetails=$(echo $describe | sed -e "s/^$version-//") - commitnum=$(echo $commitdetails | cut -d- -f1) + commitnum=$(echo $commitdetails | cut -s -d- -f1) commithash=$(echo $commitdetails | cut -d- -f2) fi -- cgit v1.2.3