[pitivi] flatpak: Simplify obtaining the current branch
- From: Alexandru Băluț <alexbalut src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] flatpak: Simplify obtaining the current branch
- Date: Sat, 16 Jul 2016 09:15:58 +0000 (UTC)
commit 181def1c7aa8611509b19797316e504b795169df
Author: Alexandru Băluț <alexandru balut gmail com>
Date: Thu Jul 7 14:06:35 2016 +0200
flatpak: Simplify obtaining the current branch
build/flatpak/pitivi-flatpak | 11 +++--------
1 files changed, 3 insertions(+), 8 deletions(-)
---
diff --git a/build/flatpak/pitivi-flatpak b/build/flatpak/pitivi-flatpak
index 61d3a69..8915096 100755
--- a/build/flatpak/pitivi-flatpak
+++ b/build/flatpak/pitivi-flatpak
@@ -326,15 +326,10 @@ fi
if [ -n "$BUILD" ] && [ -z "$BUNDLE" ]
then
cd $APPLICATION_REPOSITORY
- DEVELOPMENT_BRANCHNAME=`git branch 2>&1 | grep \* | awk '{ print $2 }'`
+ # Either a branch name or "HEAD".
+ DEVELOPMENT_BRANCHNAME=`git rev-parse --abbrev-ref HEAD`
cd - > /dev/null
- if [ x$DEVELOPMENT_BRANCHNAME == 'x' ]
- then
- DEVELOPMENT_BRANCHNAME="master"
- APP_BUILD_NAME=$APPLICATION_NAME
- else
- APP_BUILD_NAME="$APPLICATION_NAME-$DEVELOPMENT_BRANCHNAME"
- fi
+ APP_BUILD_NAME="$APPLICATION_NAME-$DEVELOPMENT_BRANCHNAME"
LOCAL_REPOS_PATH=$FLATPAK_ENVPATH
else
DEVELOPMENT_BRANCHNAME=${BRANCH:-master}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]