Minor bug fixed in RO/start_build: fetching before checkout 77/277/1
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Wed, 31 Aug 2016 13:30:45 +0000 (15:30 +0200)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Wed, 31 Aug 2016 13:30:45 +0000 (15:30 +0200)
Change-Id: Iaea68b92edd659e0b5c330f4864f1cca349e2808
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
jenkins/RO/start_build

index f3d2117..0db007b 100755 (executable)
@@ -27,13 +27,14 @@ OSM_load_config
 if [ -d $OSM_MDG ]; then
        INFO "reusing existing workspace"
        cd $OSM_MDG
-       git pull 
+       git pull
 else
        INFO "cloning MDG $OSM_MDG from $OSM_GIT_URL/$OSM_MDG"
        git clone $OSM_GIT_URL/$OSM_MDG
        cd $OSM_MDG
 fi
 if [ $# -gt 0 ]; then
+       git fetch origin +refs/for/master || FATAL "git fetch didn't work"
        git checkout $1 || FATAL "git checkout '$1' didn't work"
 fi