Skip to content

Commit 8e703e0

Browse files
codesurf42ChrisJStone
authored andcommitted
a quick option to create release from existing feature branch
1 parent 48596d7 commit 8e703e0

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

git-flow-feature

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,32 @@ no-ff! Never fast-forward during the merge
430430
helper_finish_cleanup
431431
}
432432

433+
cmd_release() {
434+
# 1) pull dev from origin
435+
# git_do checkout "$BRANCH"
436+
# git_do (or somth exists alredy here?)
437+
438+
# Parse arguments
439+
parse_args "$@"
440+
441+
# Use current branch if no name is given
442+
if [ "$NAME" = "" ]; then
443+
gitflow_use_current_branch_name
444+
fi
445+
446+
# 2) merge feature to dev
447+
cmd_finish "--fetch" "--squash" "--keep" $NAME
448+
449+
# 3) sync back dev to feature
450+
echo "Merging $BASE_BRANCH to $BRANCH"
451+
git_do checkout "$BRANCH" || die "Could not check out branch '$BRANCH'."
452+
git_do merge "$BASE_BRANCH"
453+
454+
# 4) create release
455+
git_do flow release start $NAME
456+
457+
}
458+
433459
helper_finish_cleanup() {
434460
local keepmsg remotebranchdeleted localbranchdeleted
435461

0 commit comments

Comments
 (0)