Skip to content

Commit

Permalink
feat(feature): add release sub command
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ChrisJStone committed Jul 5, 2023
1 parent cfb08d7 commit d73ef0a
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions git-flow-feature
Original file line number Diff line number Diff line change
Expand Up @@ -452,16 +452,12 @@ h,help! Show this help
gitflow_use_current_branch_name
fi

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

# 3) sync back dev to feature
echo "Merging $BASE_BRANCH to $BRANCH"
git_do checkout "$BRANCH" || die "Could not check out branch '$BRANCH'."
git_do merge "$BASE_BRANCH"

# 4) create release
git_do flow release start $NAME
# 3) create release
git_do flow release start $NAME $BRANCH

}

Expand Down

0 comments on commit d73ef0a

Please sign in to comment.