Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitflow
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tools
gitflow
Commits
ca8be527
Commit
ca8be527
authored
Oct 05, 2010
by
Vincent Driessen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow finishing release branches without creating a tag.
This is useful for small projects.
parent
46f9998f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
28 deletions
+42
-28
git-flow-hotfix
git-flow-hotfix
+21
-14
git-flow-release
git-flow-release
+21
-14
No files found.
git-flow-hotfix
View file @
ca8be527
...
...
@@ -195,6 +195,7 @@ cmd_finish() {
DEFINE_string message "" "use the given tag message" m
DEFINE_boolean push false "push to $ORIGIN after performing finish" p
DEFINE_boolean keep false "keep branch after performing finish" k
DEFINE_boolean notag false "don't tag this release" n
parse_args "$@"
require_version_arg
...
...
@@ -230,17 +231,19 @@ cmd_finish() {
# TODO: What do we do now?
fi
# try to tag the release
# in case a previous attempt to finish this release branch has failed,
# but the tag was set successful, we skip it now
local tagname=$VERSION_PREFIX$VERSION
if ! git_tag_exists "$tagname"; then
local opts="-a"
flag sign && opts="$opts -s"
[ "$FLAGS_signingkey" != "" ] && opts="$opts -u '$FLAGS_signingkey'"
[ "$FLAGS_message" != "" ] && opts="$opts -m '$FLAGS_message'"
git tag $opts "$VERSION_PREFIX$VERSION" || \
die "Tagging failed. Please run finish again to retry."
if noflag notag; then
# try to tag the release
# in case a previous attempt to finish this release branch has failed,
# but the tag was set successful, we skip it now
local tagname=$VERSION_PREFIX$VERSION
if ! git_tag_exists "$tagname"; then
local opts="-a"
flag sign && opts="$opts -s"
[ "$FLAGS_signingkey" != "" ] && opts="$opts -u '$FLAGS_signingkey'"
[ "$FLAGS_message" != "" ] && opts="$opts -m '$FLAGS_message'"
git tag $opts "$VERSION_PREFIX$VERSION" || \
die "Tagging failed. Please run finish again to retry."
fi
fi
# try to merge into develop
...
...
@@ -267,15 +270,19 @@ cmd_finish() {
die "Could not push to $DEVELOP_BRANCH from $ORIGIN."
git push "$ORIGIN" "$MASTER_BRANCH" || \
die "Could not push to $MASTER_BRANCH from $ORIGIN."
git push --tags "$ORIGIN" || \
die "Could not push tags to $ORIGIN."
if noflag notag; then
git push --tags "$ORIGIN" || \
die "Could not push tags to $ORIGIN."
fi
fi
echo
echo "Summary of actions:"
echo "- Latest objects have been fetched from '$ORIGIN'"
echo "- Hotfix branch has been merged into '$MASTER_BRANCH'"
echo "- The hotfix was tagged '$VERSION_PREFIX$VERSION'"
if noflag notag; then
echo "- The hotfix was tagged '$VERSION_PREFIX$VERSION'"
fi
echo "- Hotfix branch has been back-merged into '$DEVELOP_BRANCH'"
if flag keep; then
echo "- Hotfix branch '$BRANCH' is still available"
...
...
git-flow-release
View file @
ca8be527
...
...
@@ -192,6 +192,7 @@ cmd_finish() {
DEFINE_string message "" "use the given tag message" m
DEFINE_boolean push false "push to $ORIGIN after performing finish" p
DEFINE_boolean keep false "keep branch after performing finish" k
DEFINE_boolean notag false "don't tag this release" n
parse_args "$@"
require_version_arg
...
...
@@ -228,17 +229,19 @@ cmd_finish() {
# TODO: What do we do now?
fi
# try to tag the release
# in case a previous attempt to finish this release branch has failed,
# but the tag was set successful, we skip it now
local tagname=$VERSION_PREFIX$VERSION
if ! git_tag_exists "$tagname"; then
local opts="-a"
flag sign && opts="$opts -s"
[ "$FLAGS_signingkey" != "" ] && opts="$opts -u '$FLAGS_signingkey'"
[ "$FLAGS_message" != "" ] && opts="$opts -m '$FLAGS_message'"
git tag $opts "$tagname" || \
die "Tagging failed. Please run finish again to retry."
if noflag notag; then
# try to tag the release
# in case a previous attempt to finish this release branch has failed,
# but the tag was set successful, we skip it now
local tagname=$VERSION_PREFIX$VERSION
if ! git_tag_exists "$tagname"; then
local opts="-a"
flag sign && opts="$opts -s"
[ "$FLAGS_signingkey" != "" ] && opts="$opts -u '$FLAGS_signingkey'"
[ "$FLAGS_message" != "" ] && opts="$opts -m '$FLAGS_message'"
git tag $opts "$tagname" || \
die "Tagging failed. Please run finish again to retry."
fi
fi
# try to merge into develop
...
...
@@ -268,8 +271,10 @@ cmd_finish() {
die "Could not push to $DEVELOP_BRANCH from $ORIGIN."
git push "$ORIGIN" "$MASTER_BRANCH" || \
die "Could not push to $MASTER_BRANCH from $ORIGIN."
git push --tags "$ORIGIN" || \
die "Could not push tags to $ORIGIN."
if noflag notag; then
git push --tags "$ORIGIN" || \
die "Could not push tags to $ORIGIN."
fi
git push "$ORIGIN" :"$BRANCH" || \
die "Could not delete the remote $BRANCH in $ORIGIN."
fi
...
...
@@ -278,7 +283,9 @@ cmd_finish() {
echo "Summary of actions:"
echo "- Latest objects have been fetched from '$ORIGIN'"
echo "- Release branch has been merged into '$MASTER_BRANCH'"
echo "- The release was tagged '$tagname'"
if noflag notag; then
echo "- The release was tagged '$tagname'"
fi
echo "- Release branch has been back-merged into '$DEVELOP_BRANCH'"
if flag keep; then
echo "- Release branch '$BRANCH' is still available"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment