File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -216,11 +216,13 @@ subsplit_publish()
216216 fi
217217
218218 say " - syncing branch '${HEAD} '"
219+
219220 git checkout master > /dev/null 2>&1
220221 git branch -D " $LOCAL_BRANCH " > /dev/null 2>&1
221222 git branch -D " ${LOCAL_BRANCH} -checkout" > /dev/null 2>&1
222223 git checkout -b " ${LOCAL_BRANCH} -checkout" " origin/${HEAD} " > /dev/null 2>&1
223224 git subtree split -q --prefix=" $SUBPATH " --branch=" $LOCAL_BRANCH " " origin/${HEAD} " > /dev/null
225+ RETURNCODE=$?
224226
225227 if [ -n " $VERBOSE " ];
226228 then
@@ -231,7 +233,7 @@ subsplit_publish()
231233 echo " ${DEBUG} git subtree split -q --prefix=\" $SUBPATH \" --branch=\" $LOCAL_BRANCH \" \" origin/${HEAD} \" >/dev/null"
232234 fi
233235
234- if [ $? -eq 0 ]
236+ if [ $RETURNCODE -eq 0 ]
235237 then
236238 PUSH_CMD=" git push -q ${DRY_RUN} --force $REMOTE_NAME ${LOCAL_BRANCH} :${HEAD} "
237239
@@ -291,14 +293,15 @@ subsplit_publish()
291293
292294 say " - subtree split for '${TAG} '"
293295 git subtree split -q --annotate=" ${ANNOTATE} " --prefix=" $SUBPATH " --branch=" $LOCAL_TAG " " $TAG " > /dev/null
296+ RETURNCODE=$?
294297
295298 if [ -n " $VERBOSE " ];
296299 then
297300 echo " ${DEBUG} git subtree split -q --annotate=\" ${ANNOTATE} \" --prefix=\" $SUBPATH \" --branch=\" $LOCAL_TAG \" \" $TAG \" >/dev/null"
298301 fi
299302
300303 say " - subtree split for '${TAG} ' [DONE]"
301- if [ $? -eq 0 ]
304+ if [ $RETURNCODE -eq 0 ]
302305 then
303306 PUSH_CMD=" git push -q ${DRY_RUN} --force ${REMOTE_NAME} ${LOCAL_TAG} :refs/tags/${TAG} "
304307
You can’t perform that action at this time.
0 commit comments