diff --git a/Gruntfile.js b/Gruntfile.js index 13ef322286..92751469ea 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -227,16 +227,23 @@ const configureGrunt = function (grunt) { exit 1 fi - REMOTE=$(git remote | grep "${upstream}" > /dev/null && echo "${upstream}" || echo "origin") + git checkout master + + if git config remote.${upstream}.url > /dev/null; then + git pull ${upstream} master + else + git pull origin master + fi - git checkout master && \ - git pull $REMOTE master && \ yarn && \ git submodule foreach " git checkout master - REMOTE=$(git remote | grep "${upstream}" > /dev/null && echo "${upstream}" || echo "origin") - git pull $REMOTE master + if git config remote.${upstream}.url > /dev/null; then + git pull ${upstream} master + else + git pull origin master + fi " `; }