Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- CMD="$1"
- shift 1
- function get_feature () {
- FEATURE=`git flow feature | grep '^\* ' | sed 's/^\* //'`
- ISSUE=`echo "$FEATURE" | sed -e 's/issue-\([0-9]*\)-.*/\1/'`
- echo "Feature: $FEATURE (issue: $ISSUE)"
- }
- case "$CMD" in
- "")
- git flow feature
- ;;
- start)
- git flow feature "$CMD" "$@"
- ;;
- track)
- git flow feature "$CMD" "$@"
- ;;
- finish|publish|diff|checkout|pull)
- get_feature
- git flow feature "$CMD" "$FEATURE"
- ;;
- pr)
- get_feature
- git flow feature publish "$FEATURE" && hub pull-request -i "$ISSUE" -b develop
- esac
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement