Tweak mfpub stashing
This commit is contained in:
parent
fd346c6cd1
commit
0eae26a7be
|
@ -33,9 +33,9 @@ fi
|
||||||
# Check out the named branch (or stay in current)
|
# Check out the named branch (or stay in current)
|
||||||
|
|
||||||
if [[ $BRANCH != $CURR ]]; then
|
if [[ $BRANCH != $CURR ]]; then
|
||||||
git checkout $BRANCH
|
|
||||||
echo "Stashing any changes to files..."
|
echo "Stashing any changes to files..."
|
||||||
[[ $(git stash) != "No local "* ]] && HAS_STASH=1
|
[[ $(git stash) != "No local "* ]] && HAS_STASH=1
|
||||||
|
git checkout $BRANCH
|
||||||
fi
|
fi
|
||||||
|
|
||||||
COMMIT=$( git log --format="%H" -n 1 )
|
COMMIT=$( git log --format="%H" -n 1 )
|
||||||
|
@ -135,4 +135,4 @@ git push -f upstream | {
|
||||||
rm -rf ${TMPFOLDER}
|
rm -rf ${TMPFOLDER}
|
||||||
|
|
||||||
# Go back to the branch we started from
|
# Go back to the branch we started from
|
||||||
[[ $BRANCH != $CURR ]] && { git checkout $BRANCH ; [[ $HAS_STASH == 1 ]] && git stash pop ; }
|
[[ $BRANCH != $CURR ]] && git checkout $BRANCH && [[ $HAS_STASH == 1 ]] && git stash pop
|
||||||
|
|
Loading…
Reference in a new issue