Tweak mfpub stashing

2.0.x
Scott Lahteine 5 years ago
parent fd346c6cd1
commit 0eae26a7be

@ -33,9 +33,9 @@ fi
# Check out the named branch (or stay in current)
if [[ $BRANCH != $CURR ]]; then
git checkout $BRANCH
echo "Stashing any changes to files..."
[[ $(git stash) != "No local "* ]] && HAS_STASH=1
git checkout $BRANCH
fi
COMMIT=$( git log --format="%H" -n 1 )
@ -135,4 +135,4 @@ git push -f upstream | {
rm -rf ${TMPFOLDER}
# 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…
Cancel
Save