Skip to content

Instantly share code, notes, and snippets.

@pvaviloff
Last active February 27, 2020 16:11
Show Gist options
  • Save pvaviloff/7b97221adbdebe9bc06868bf628ba045 to your computer and use it in GitHub Desktop.
Save pvaviloff/7b97221adbdebe9bc06868bf628ba045 to your computer and use it in GitHub Desktop.
# docker container bash
function dcbash { docker exec -it "$1" /bin/bash; }
# test and push branch.
# Example: gtpush 3xter-branch
# Or: gtpush 3xter-branch path/to/Test.php
function gtpush {
if [ -z "$2" ]; then
php fuel/vendor/bin/phpunit
else
php fuel/vendor/bin/phpunit "$2"
fi
if [ $? -ne 0 ]; then
return $?
fi
git push origin "$1"
if [ $? -ne 0 ]; then
git push --set-upstream origin "$1"
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment