Explorar el Código

build.sh: if is an existing remote branch, then execute 'git pull' to get the newest version

Karsten Böddeker hace 8 años
padre
commit
cd75eb8b14
Se han modificado 1 ficheros con 5 adiciones y 1 borrados
  1. 5 1
      build.sh

+ 5 - 1
build.sh

@@ -56,7 +56,6 @@ pushd ${MY_DIR} > /dev/null
 
 ### set reasonable defaults for unset environment variables
 [ -n "${AUTOUPDATER}" ] || AUTOUPDATER=${BRANCH}
-# TODO: [ "${BASE}" == "master" ] && BASE="origin/master"
 if [ -n "${BROKEN}" ]; then
 	if [ "${BROKEN}" -eq "1" ]; then
 		export BROKEN
@@ -119,6 +118,11 @@ progress "Checking out GLUON '${BASE}' ..."
 git fetch
 git checkout -q ${BASE}
 [ "$?" -eq "0" ] || abort "Failed to checkout '${BASE}' gluon base version, mimimi." >&2
+git show-ref --verify --quiet refs/remotes/origin/${BASE}
+if [ "$?" -eq "0" ]; then
+	git pull
+	[ "$?" -eq "0" ] || abort "Failed to get newest '${BASE}' in gluon repository, mimimi."
+fi
 GLUON_COMMIT=$(git rev-list --max-count=1 HEAD)