From d46d6bd6b65f7d44a9523f2147d2a3473368ee61 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Sat, 15 Apr 2017 14:02:54 -0400 Subject: [PATCH] add parsing of recipe git branch parameter in build sciprt --- libretro-buildbot-recipe.sh | 43 +++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/libretro-buildbot-recipe.sh b/libretro-buildbot-recipe.sh index 4a24bd5a..21ec03f3 100755 --- a/libretro-buildbot-recipe.sh +++ b/libretro-buildbot-recipe.sh @@ -655,11 +655,12 @@ while read line; do NAME=`echo $line | cut -f 1 -d " "` DIR=`echo $line | cut -f 2 -d " "` URL=`echo $line | cut -f 3 -d " "` - TYPE=`echo $line | cut -f 4 -d " "` - ENABLED=`echo $line | cut -f 5 -d " "` - COMMAND=`echo $line | cut -f 6 -d " "` - MAKEFILE=`echo $line | cut -f 7 -d " "` - SUBDIR=`echo $line | cut -f 8 -d " "` + GIT_BRANCH=`echo $line | cut -f 4 -d " "` + TYPE=`echo $line | cut -f 5 -d " "` + ENABLED=`echo $line | cut -f 6 -d " "` + COMMAND=`echo $line | cut -f 7 -d " "` + MAKEFILE=`echo $line | cut -f 8 -d " "` + SUBDIR=`echo $line | cut -f 9 -d " "` if [ "${ENABLED}" = "YES" ]; then echo "buildbot job: $jobid processing $NAME" @@ -677,14 +678,9 @@ while read line; do ARGS="" - TEMP=`echo $line | cut -f 9 -d " "` - if [ -n ${TEMP} ]; then - ARGS="${TEMP}" - fi - TEMP="" TEMP=`echo $line | cut -f 10 -d " "` if [ -n ${TEMP} ]; then - ARGS="${ARGS} ${TEMP}" + ARGS="${TEMP}" fi TEMP="" TEMP=`echo $line | cut -f 11 -d " "` @@ -706,11 +702,11 @@ while read line; do if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi - TEMP="" - TEMP=`echo $line | cut -f 15 -d " "` - if [ -n ${TEMP} ]; then - ARGS="${ARGS} ${TEMP}" - fi + TEMP="" + TEMP=`echo $line | cut -f 15 -d " "` + if [ -n ${TEMP} ]; then + ARGS="${ARGS} ${TEMP}" + fi TEMP="" TEMP=`echo $line | cut -f 16 -d " "` if [ -n ${TEMP} ]; then @@ -781,6 +777,11 @@ while read line; do if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi + TEMP="" + TEMP=`echo $line | cut -f 30 -d " "` + if [ -n ${TEMP} ]; then + ARGS="${ARGS} ${TEMP}" + fi ARGS="${ARGS%"${ARGS##*[![:space:]]}"}" BUILD="NO" @@ -790,7 +791,7 @@ while read line; do if [ "${CLEANUP}" == "YES" ]; then rm -rfv $DIR echo "cloning repo $URL..." - git clone --depth=1 "$URL" "$DIR" + git clone --depth=1 -b "$GIT_BRANCH" "$URL" "$DIR" BUILD="YES" else cd $DIR @@ -905,7 +906,7 @@ while read line; do cd $WORK else echo "cloning repo $URL..." - git clone --depth=1 "$URL" "$DIR" + git clone --depth=1 -b "$GIT_BRANCH" "$URL" "$DIR" BUILD="YES" fi elif [ "${TYPE}" = "psp_hw_render" ]; then @@ -933,7 +934,7 @@ while read line; do else echo "pulling changes from repo... " - git clone "$URL" "$DIR" + git clone -b "$GIT_BRANCH" "$URL" "$DIR" cd $DIR git checkout $TYPE cd $WORK @@ -964,7 +965,7 @@ while read line; do cd $WORK else echo "cloning repo $URL..." - git clone --depth=1 "$URL" "$DIR" + git clone --depth=1 -b "$GIT_BRANCH" "$URL" "$DIR" cd $DIR git submodule update --init BUILD="YES" @@ -1103,7 +1104,7 @@ buildbot_pull(){ if [ ! -z "$BRANCH" -a "${NAME}" == "retroarch" ]; then git clone -b "$BRANCH" "$URL" "$DIR" else - git clone "$URL" "$DIR" --depth=1 + git clone -b "$GIT_BRANCH" "$URL" "$DIR" --depth=1 fi cd $WORK if [ "${TYPE}" = "PROJECT" ]; then