mirror of
https://github.com/bonfire-networks/bonfire-app.git
synced 2024-05-18 00:52:40 +00:00
git push optional
This commit is contained in:
parent
cb5a6dc313
commit
8abcf1f0a9
|
@ -24,13 +24,19 @@ then
|
|||
# if there are changes, commit them (needed before being able to rebase)
|
||||
git diff-index --quiet HEAD || git commit --verbose --all || echo Skipped...
|
||||
|
||||
if [[ $2 == 'pull' ]]
|
||||
then
|
||||
git fetch
|
||||
fi
|
||||
# if [[ $2 == 'pull' ]]
|
||||
# then
|
||||
# git fetch
|
||||
# fi
|
||||
|
||||
# merge/rebase local changes
|
||||
git rebase origin && echo "Publishing changes!" && git push || fail "Please resolve conflicts before continuing."
|
||||
# git rebase origin
|
||||
git pull --rebase && echo "Publishing changes!" || fail "Please resolve conflicts before continuing."
|
||||
|
||||
if [[ $2 != 'pull' && $2 == 'maybe-pull' ]]
|
||||
then
|
||||
git push
|
||||
fi
|
||||
|
||||
else
|
||||
set -e
|
||||
|
@ -44,6 +50,7 @@ else
|
|||
if [[ $2 == 'maybe-pull' ]]
|
||||
then
|
||||
# if jungle is available and we assume fetches were already done
|
||||
command -v jungle || git pull --rebase || fail "Please resolve conflicts before continuing."
|
||||
# command -v jungle ||
|
||||
git pull --rebase || fail "Please resolve conflicts before continuing."
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue