Added a function to get the branch we are building.
(cherry picked from commit 1e4881bf43
)
This commit is contained in:
parent
a2fb483e3f
commit
0e76af6042
|
@ -8,3 +8,11 @@ BUILD=$(grep 'my $pandora_build =' $CODEHOME/pandora_server/lib/PandoraFMS/Confi
|
||||||
X86_64=`uname -m | grep x86_64`
|
X86_64=`uname -m | grep x86_64`
|
||||||
CONSOLEHOME=$CODEHOME/pandora_console
|
CONSOLEHOME=$CODEHOME/pandora_console
|
||||||
CONSOLEHOME_ENT=$CODEHOME_ENT/pandora_console
|
CONSOLEHOME_ENT=$CODEHOME_ENT/pandora_console
|
||||||
|
|
||||||
|
function get_current_branch {
|
||||||
|
cd "$CODEHOME" || return ""
|
||||||
|
BRANCH=`git branch 2>/dev/null | grep \* | awk '{print $2}'`
|
||||||
|
cd -
|
||||||
|
return $BRANCH
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue