Created
August 20, 2016 17:56
-
-
Save tylerdigital/750039b2afeec101ac6c6859618ddffb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ -z $3 ]]; then | |
echo "usage $0 | |
type (plugin or theme) | |
message | |
directory" | |
exit; | |
fi | |
if [[ $1 != 'plugin' && $1 != 'theme' ]]; then | |
echo "Type is not plugin or theme! Goodbye!" | |
exit; | |
fi | |
TYPE=$1 | |
MESSAGE=$2 | |
PATH=$3 | |
# BASE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )" | |
git add -A $PATH; | |
git commit -m "$MESSAGE" | |
BRANCH=$(cat $BASE_DIR/.git/HEAD) | |
BRANCH=$(echo ${BRANCH##*/}) | |
git fetch | |
git merge origin/$BRANCH | |
git push origin $BRANCH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment