From f430152f61abf06dec4d19b147cb454abc231a15 Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Mon, 10 Jul 2017 11:22:56 +0200 Subject: [PATCH] moved common git evaluation variables to the common folder --- evalVersionVariables.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 evalVersionVariables.sh diff --git a/evalVersionVariables.sh b/evalVersionVariables.sh new file mode 100644 index 000000000..5824ca13c --- /dev/null +++ b/evalVersionVariables.sh @@ -0,0 +1,22 @@ +GITREPO1='git remote -v' +GITREPO2=" | grep \"fetch\" | cut -d' ' -f1" +BRANCH1='git branch -v' +BRANCH2=" | grep '*' | cut -d' ' -f2" +REPUID1='git log --pretty=format:"%H" -1' +AUTH1_1='git log --pretty=format:"%cn" -1' +AUTH1_2=" | cut -d' ' -f1" +AUTH2_1='git log --pretty=format:"%cn" -1' +AUTH2_2=" | cut -d' ' -f2" +FOLDERREV1='git log --oneline . ' #used for all the individual server folders +FOLDERREV2=" | wc -l" #used for all the individual server folders +REV1='git log --oneline ' +REV2=" | wc -l" + +GITREPO=`eval $GITREPO1 $GITREPO2` +BRANCH=`eval $BRANCH1 $BRANCH2` +REPUID=`eval $REPUID1` +AUTH1=`eval $AUTH1_1 $AUTH1_2` +AUTH2=`eval $AUTH2_1 $AUTH2_2` +REV=`eval $REV1 $REV2` +FOLDERREV=`eval $FOLDERREV1 $FOLDERREV2` +