Skip to content

Commit c322458

Browse files
authored
feat(feature): add feature release command (#64)
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.
2 parents 48596d7 + aae1608 commit c322458

File tree

3 files changed

+42
-1
lines changed

3 files changed

+42
-1
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Changelog
22

3+
#### 2.2.0-SNAPSHOT
4+
* feat(feature): add release sub command. Thank You [codesurf42](https://github.com/codesurf42) for the initial pr
5+
* feat(init): add sign flag to create initial signed commit
6+
* feat(init): add support for "Support Git Environment Credentials" pull request #19 from filipekiss/feature/environment_credentials
7+
* docs: update repository url in source files
8+
* docs: update copyright information in source files
9+
* fix: wording for help text in git flow log pull request #15 from Shea690901/hotfix/git-flow-log_help-message
10+
* refactor(git-flow): add support for busybox-readlink request #12 from KAction/readlink-busybox
11+
12+
313
#### 2.1.0
414
* feat: add create command to release allowing for a single step release prodution
515
* feat: add missing hook script filter-flow-release-finish-version

git-flow-feature

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ git flow feature checkout
5959
git flow feature pull
6060
git flow feature delete
6161
git flow feature rename
62+
git flow feature release
6263
6364
Manage your feature branches.
6465
@@ -430,6 +431,36 @@ no-ff! Never fast-forward during the merge
430431
helper_finish_cleanup
431432
}
432433

434+
cmd_release() {
435+
OPTIONS_SPEC="\
436+
git flow feature release [-h]
437+
438+
Create a release based on current feature
439+
--
440+
h,help! Show this help
441+
"
442+
443+
# 1) pull dev from origin
444+
# git_do checkout "$BRANCH"
445+
# git_do (or somth exists alredy here?)
446+
447+
# Parse arguments
448+
parse_args "$@"
449+
450+
# Use current branch if no name is given
451+
if [ "$NAME" = "" ]; then
452+
gitflow_use_current_branch_name
453+
fi
454+
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"
458+
459+
# 3) create release
460+
git_do flow release start $NAME $BRANCH
461+
462+
}
463+
433464
helper_finish_cleanup() {
434465
local keepmsg remotebranchdeleted localbranchdeleted
435466

git-flow-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
#
4040

4141

42-
GITFLOW_VERSION=2.1.0
42+
GITFLOW_VERSION=2.2.0-SNAPSHOT-2
4343

4444
initialize() {
4545
# A function can not be empty. Comments count as empty.

0 commit comments

Comments
 (0)