Skip to content

Commit d73ef0a

Browse files
committed
feat(feature): add release sub command
Add sub command to git flow feature that allows for a release to be created based off the current feature branch. When running feature release the feature branch is rebased with develop prior to the creation of the release branch. When finishing the release the resulting tag is back merged to the feature branch and not onto the production or develop branches. resolves #63
1 parent cfb08d7 commit d73ef0a

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

git-flow-feature

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -452,16 +452,12 @@ h,help! Show this help
452452
gitflow_use_current_branch_name
453453
fi
454454

455-
# 2) merge feature to dev
456-
cmd_finish "--fetch" "--squash" "--keep" $NAME
455+
# 2) Update feature with dev
456+
echo "Rebasing $BASE_BRANCH to $BRANCH"
457+
git_do flow feature rebase || die "Could not rebase $BRANCH which is based on $BASE_BRANCH"
457458

458-
# 3) sync back dev to feature
459-
echo "Merging $BASE_BRANCH to $BRANCH"
460-
git_do checkout "$BRANCH" || die "Could not check out branch '$BRANCH'."
461-
git_do merge "$BASE_BRANCH"
462-
463-
# 4) create release
464-
git_do flow release start $NAME
459+
# 3) create release
460+
git_do flow release start $NAME $BRANCH
465461

466462
}
467463

0 commit comments

Comments
 (0)