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
61ade55f
Commit
61ade55f
authored
Jan 21, 2010
by
Vincent Driessen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add initial beginning to the gitflow subcommand infrastructure.
parent
60e07ef5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
80 additions
and
0 deletions
+80
-0
gitflow
gitflow
+49
-0
gitflow-hotfix
gitflow-hotfix
+25
-0
gitflow-sh-setup
gitflow-sh-setup
+6
-0
No files found.
gitflow
0 → 100755
View file @
61ade55f
#!/bin/sh
usage
()
{
echo
"usage: gitflow <start|finish> <btype> <args>"
echo
""
echo
"btype can be any of:
\"
feature
\"
,
\"
release
\"
,
\"
hotfix
\"
"
echo
""
}
check_incoming
()
{
if
[
"
$ACTION
"
!=
"start"
-a
"
$ACTION
"
!=
"finish"
]
;
then
usage
exit
1
fi
if
[
"
$BTYPE
"
!=
"feature"
-a
"
$BTYPE
"
!=
"release"
-a
"
$BTYPE
"
!=
"hotfix"
]
;
then
usage
exit
1
fi
}
gitflow_check_clean_working_tree
()
{
echo
"Working tree clean."
}
if
[
$#
-lt
2
]
;
then
usage
exit
1
fi
# Set & check arguments
export
GITFLOW_DIR
=
$(
dirname
"
$0
"
)
ACTION
=
"
$1
"
BTYPE
=
"
$2
"
shift
2
check_incoming
# Now, $ACTION and $BTYPE are set
# It's time to call the appropriate subcommand
.
"
$GITFLOW_DIR
/gitflow-sh-setup"
.
"
$GITFLOW_DIR
/gitflow-
$BTYPE
"
if
[
"
$ACTION
"
=
"start"
]
;
then
start
"
$@
"
elif
[
"
$ACTION
"
=
"finish"
]
;
then
finish
"
$@
"
else
usage
fi
gitflow-hotfix
0 → 100755
View file @
61ade55f
#!/bin/sh
usage
()
{
echo
"usage: gitflow start hotfix <release>"
echo
" gitflow finish hotfix <release>"
}
start
()
{
# TODO
gitflow_check_clean_working_tree
echo
"git checkout -b hotfix-
$RELEASE
master"
echo
"Bump version number"
echo
"Fix bug"
}
finish
()
{
# TODO
gitflow_check_clean_working_tree
echo
"git checkout master"
echo
"git merge --no-ff hotfix-
$RELEASE
"
echo
"git checkout develop"
echo
"git merge --no-ff hotfix-
$RELEASE
"
echo
"git branch -d hotfix-
$RELEASE
"
}
gitflow-sh-setup
0 → 100755
View file @
61ade55f
#!/bin/sh
gitflow_check_clean_working_tree
()
{
echo
"Working tree
$(
pwd
)
clean."
}
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