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
f50df990
Commit
f50df990
authored
Oct 08, 2010
by
Vincent Driessen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Manually select the last argument.
This implementation does not rely on Bash-specific functionality.
parent
ca8be527
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
3 deletions
+11
-3
git-flow-feature
git-flow-feature
+1
-1
git-flow-hotfix
git-flow-hotfix
+1
-1
git-flow-release
git-flow-release
+1
-1
gitflow-common
gitflow-common
+8
-0
No files found.
git-flow-feature
View file @
f50df990
...
@@ -180,7 +180,7 @@ parse_args() {
...
@@ -180,7 +180,7 @@ parse_args() {
parse_cmdline "$@"
parse_cmdline "$@"
# read arguments into global variables
# read arguments into global variables
NAME=$
{!#}
NAME=$
(last_arg "$@")
BRANCH=$PREFIX$NAME
BRANCH=$PREFIX$NAME
}
}
...
...
git-flow-hotfix
View file @
f50df990
...
@@ -124,7 +124,7 @@ parse_args() {
...
@@ -124,7 +124,7 @@ parse_args() {
eval set -- "${FLAGS_ARGV}"
eval set -- "${FLAGS_ARGV}"
# read arguments into global variables
# read arguments into global variables
VERSION=$
{!#}
VERSION=$
(last_arg "$@")
BRANCH=$PREFIX$VERSION
BRANCH=$PREFIX$VERSION
}
}
...
...
git-flow-release
View file @
f50df990
...
@@ -121,7 +121,7 @@ parse_args() {
...
@@ -121,7 +121,7 @@ parse_args() {
eval set -- "${FLAGS_ARGV}"
eval set -- "${FLAGS_ARGV}"
# read arguments into global variables
# read arguments into global variables
VERSION=$
{!#}
VERSION=$
(last_arg "$@")
BRANCH=$PREFIX$VERSION
BRANCH=$PREFIX$VERSION
}
}
...
...
gitflow-common
View file @
f50df990
...
@@ -44,6 +44,14 @@
...
@@ -44,6 +44,14 @@
warn() { echo "$@" >&2; }
warn() { echo "$@" >&2; }
die() { warn "$@"; exit 1; }
die() { warn "$@"; exit 1; }
# argument processing
last_arg() {
if [ $# -ne 0 ]; then
shift $(expr $# - 1)
echo "$1"
fi
}
# set logic
# set logic
has() {
has() {
local item=$1; shift
local item=$1; shift
...
...
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