4 # If the project is autorelease then we do not need to cd
5 if [ "$GERRIT_PROJECT" != "releng/autorelease" ]; then
6 cd "$WORKSPACE/$GERRIT_PROJECT"
9 echo "Checking out ${GERRIT_PROJECT} patch ${GERRIT_REFSPEC}..."
10 git fetch origin "${GERRIT_REFSPEC}" && git checkout FETCH_HEAD
12 # If the project is autorelease then we need to init and update submodules
13 if [ "$GERRIT_PROJECT" == "releng/autorelease" ]; then
14 git submodule update --init
15 # The previous checkout might have failed to remove directory of a submodule being removed.
16 # See https://stackoverflow.com/a/10761699