Skip to content

Commit

Permalink
feat(feature): add feature release command (#64)
Browse files Browse the repository at this point in the history
Create initial version of release command for git flow feature. As 
proposed in petervanderdoes/gitflow-avh#162. This request closes #63 and
also closes petervanderdoes/gitflow-avh#162 as a result.
  • Loading branch information
ChrisJStone authored Jul 5, 2023
2 parents 48596d7 + aae1608 commit c322458
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 1 deletion.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

#### 2.2.0-SNAPSHOT
* feat(feature): add release sub command. Thank You [codesurf42](https://github.com/codesurf42) for the initial pr
* feat(init): add sign flag to create initial signed commit
* feat(init): add support for "Support Git Environment Credentials" pull request #19 from filipekiss/feature/environment_credentials
* docs: update repository url in source files
* docs: update copyright information in source files
* fix: wording for help text in git flow log pull request #15 from Shea690901/hotfix/git-flow-log_help-message
* refactor(git-flow): add support for busybox-readlink request #12 from KAction/readlink-busybox


#### 2.1.0
* feat: add create command to release allowing for a single step release prodution
* feat: add missing hook script filter-flow-release-finish-version
Expand Down
31 changes: 31 additions & 0 deletions git-flow-feature
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ git flow feature checkout
git flow feature pull
git flow feature delete
git flow feature rename
git flow feature release
Manage your feature branches.
Expand Down Expand Up @@ -430,6 +431,36 @@ no-ff! Never fast-forward during the merge
helper_finish_cleanup
}

cmd_release() {
OPTIONS_SPEC="\
git flow feature release [-h]
Create a release based on current feature
--
h,help! Show this help
"

# 1) pull dev from origin
# git_do checkout "$BRANCH"
# git_do (or somth exists alredy here?)

# Parse arguments
parse_args "$@"

# Use current branch if no name is given
if [ "$NAME" = "" ]; then
gitflow_use_current_branch_name
fi

# 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) create release
git_do flow release start $NAME $BRANCH

}

helper_finish_cleanup() {
local keepmsg remotebranchdeleted localbranchdeleted

Expand Down
2 changes: 1 addition & 1 deletion git-flow-version
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#


GITFLOW_VERSION=2.1.0
GITFLOW_VERSION=2.2.0-SNAPSHOT-2

initialize() {
# A function can not be empty. Comments count as empty.
Expand Down

0 comments on commit c322458

Please sign in to comment.