Fixed check of git remote

- for some reason, that git remote check wasn't working in a bash expansion, and
  then I couldn't get variables updating properly
- this one seems to work and maintains the functionality we want
This commit is contained in:
Daniel Lockyer 2021-01-14 13:37:06 +00:00
parent 2bdb9c5d0a
commit 46574de3c5
No known key found for this signature in database
GPG Key ID: FFBC6FA2A6F6ABC1
1 changed files with 12 additions and 5 deletions

View File

@ -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
"
`;
}