Skip to content

Commit

Permalink
Be more verbose when not publishing on "git test pass". Refs #6725
Browse files Browse the repository at this point in the history
This should avoid the problem of just pressing return by accident and
allow the macro to be rerun.
  • Loading branch information
martyngigg committed Mar 18, 2013
1 parent e37a220 commit 1dec034
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Code/Tools/Workflow/git/git-test
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ end_testing() {
echo "Testing passed on ${testbranch}. Push master to remote (y/n)?"
read publish
if [ "${publish}" = "y" ]; then
# Publish
git_halt_on_error push origin ${PRODUCTION_BRANCH}
# Delete branch on the remote
git_halt_on_error push origin :${testbranch}
Expand All @@ -180,9 +181,12 @@ end_testing() {
if [ $? -eq 1 ]; then
git_halt_on_error branch -D ${testbranch}
fi
else
echo "Warning: Branch is still merged locally but has NOT been pushed to the remote."
exit 0
fi
else
echo "Testing failed on branch ${testbranch}. Resetting ${PRODUCTION_BRANCH} to origin/${PRODUCTION_BRANCH}"
echo "Testing failed on branch ${testbranch}. ${PRODUCTION_BRANCH} reset to origin/${PRODUCTION_BRANCH}"
git_halt_on_error reset --hard origin/${PRODUCTION_BRANCH}
fi

Expand Down

0 comments on commit 1dec034

Please sign in to comment.