Advertisement
Guest User

Untitled

a guest
Apr 21st, 2015
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. #!/bin/bash
  2. CMD="$1"
  3. shift 1
  4.  
  5. function get_feature () {
  6. FEATURE=`git flow feature | grep '^\* ' | sed 's/^\* //'`
  7. ISSUE=`echo "$FEATURE" | sed -e 's/issue-\([0-9]*\)-.*/\1/'`
  8. echo "Feature: $FEATURE (issue: $ISSUE)"
  9. }
  10.  
  11. case "$CMD" in
  12. "")
  13. git flow feature
  14. ;;
  15. start)
  16. git flow feature "$CMD" "$@"
  17. ;;
  18. track)
  19. git flow feature "$CMD" "$@"
  20. ;;
  21. finish|publish|diff|checkout|pull)
  22. get_feature
  23. git flow feature "$CMD" "$FEATURE"
  24. ;;
  25. pr)
  26. get_feature
  27. git flow feature publish "$FEATURE" && hub pull-request -i "$ISSUE" -b develop
  28. esac
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement