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
696b9eb8
Commit
696b9eb8
authored
Jan 26, 2010
by
Vincent Driessen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Functionally implement the creation/finishing of release branches.
parent
be7d4169
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
11 deletions
+55
-11
TODO.mdown
TODO.mdown
+10
-0
gitflow-release
gitflow-release
+45
-11
No files found.
TODO.mdown
View file @
696b9eb8
TODO-list
=========
General configuration
---------------------
- Support configurable naming for fixed branch names 'master' and 'develop'
- Support configurable naming conventions (i.e. name prefixes) for supporting
branches, instead of fixed 'release-\*' and 'hotfix-\*'
Release branch support
----------------------
- Take care of the situation where two release branches live next to each
other. In that situation, a "finish release" action should merge back changes
into the other release, not into 'develop'. Or at least warn about it. Or not
support creating a new release branch if the other isn't finished yet.
gitflow-release
View file @
696b9eb8
...
...
@@ -15,12 +15,23 @@
usage
()
{
echo
"usage: gitflow start release <release>"
echo
" gitflow finish release <release>"
# TODO
#echo ""
#echo "options:"
#echo "--option Explanation"
#echo ""
#echo "start-only options:"
#echo "--bump <script>"
#echo " Run the given script to auto-update the version number"
#echo ""
#echo "finish-only options:"
#echo "--push Push to the origin repo when finished"
}
parse_args
()
{
RELEASE
=
"
$1
"
if
[
"
$RELEASE
"
=
""
]
;
then
echo
"Missing argument <release>
.
"
echo
"Missing argument <release>"
usage
exit
1
fi
...
...
@@ -36,8 +47,19 @@ start() {
gitflow_require_branch_absent
"
$RELEASE_BRANCH
"
# All checks passed, ready to roll
echo
"git checkout -b
\"
$RELEASE_BRANCH
\"
develop"
echo
"Don't forget to bump the version number now."
git checkout
-b
"
$RELEASE_BRANCH
"
develop
echo
""
echo
"Summary of actions:"
echo
"- A new branch '
$RELEASE_BRANCH
' was created, based on 'develop'"
echo
"- You are now on branch '
$RELEASE_BRANCH
'"
echo
""
echo
"Follow-up actions:"
echo
"- Bump the version number now!"
echo
"- Start committing last-minute fixes in preparing your release"
echo
"- When done, run:"
echo
""
echo
" gitflow finish release '
$RELEASE_BRANCH
'"
}
finish
()
{
...
...
@@ -46,17 +68,29 @@ finish() {
# Checks
gitflow_check_clean_working_tree
echo
"git fetch origin"
git fetch origin
git fetch origin develop
# TODO: Make a flag to skip these fetches
git fetch origin
master
# TODO: Make a flag to skip these fetches
gitflow_require_branches_equal
'master'
'origin/master'
gitflow_require_branches_equal
'develop'
'origin/develop'
# All checks passed, ready to roll
echo
"git checkout master"
echo
"git merge --no-ff
\"
$RELEASE_BRANCH
\"
"
echo
"git tag
\"
$RELEASE
\"
"
echo
"git checkout develop"
echo
"git merge --no-ff
\"
$RELEASE_BRANCH
\"
"
echo
"git branch -d
\"
$RELEASE_BRANCH
\"
"
git checkout master
git merge
--no-ff
"
$RELEASE_BRANCH
"
git tag
"
$RELEASE
"
git checkout develop
git merge
--no-ff
"
$RELEASE_BRANCH
"
git branch
-d
"
$RELEASE_BRANCH
"
# TODO: Implement an optional push to master
# git push origin develop; git push origin master; git push --tags origin
echo
""
echo
"Summary of actions:"
echo
"- Latest objects have been fetched from 'origin'"
echo
"- Release branch has been merged into 'master'"
echo
"- The release was tagged '
$RELEASE
'"
echo
"- Release branch has been back-merged into 'develop'"
echo
"- Release branch '
$RELEASE_BRANCH
' has been deleted"
echo
""
}
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