Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etersoft-build-utils
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
korinf
etersoft-build-utils
Commits
bf0fc3da
Commit
bf0fc3da
authored
Dec 21, 2010
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gpush: rewrite girar/branch detection part, refactoring
parent
84d52ce6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
24 deletions
+30
-24
gpush
bin/gpush
+30
-24
No files found.
bin/gpush
View file @
bf0fc3da
...
@@ -65,33 +65,49 @@ push_to_remote()
...
@@ -65,33 +65,49 @@ push_to_remote()
[
-z
"
$TAGSALL
"
]
||
git push
--tags
$GHOST
$CURRENTBRANCH
[
-z
"
$TAGSALL
"
]
||
git push
--tags
$GHOST
$CURRENTBRANCH
}
}
do_push
()
tune_girarlist
()
{
{
REMOTELIST
=
"
$(
get_remote_git_list
)
"
REMOTELIST
=
"
$(
get_remote_git_list
)
"
GIRARHOST
=
$1
NEWGIRAR
=
$1
shift
# use one target if it one
# If run with gear as param
if
is_one_girar_name
"
$REMOTELIST
"
&&
[
-z
"
$GIRARHOST
"
]
;
then
if
[
-n
"
$NEWGIRAR
"
]
;
then
GIRARHOST
=
"
$REMOTELIST
"
# if run with girar host in arg
fi
if
is_girar_name
"
$NEWGIRAR
"
;
then
# origin by default if exists and alone
# if remote list is empty, do ginit
if
[
-z
"
$GIRARHOST
"
]
&&
[
"
$(
git remote |
uniq
)
"
=
"origin"
]
;
then
[
-n
"
$REMOTELIST
"
]
||
ginit
$NEWGIRAR
GIRARHOST
=
"origin"
fi
LISTGIRARHOST
=
"
$NEWGIRAR
"
shift
else
# use one target if it one
if
is_one_girar_name
"
$REMOTELIST
"
;
then
GIRARHOST
=
"
$REMOTELIST
"
fi
# origin by default if exists and alone
if
[
"
$(
get_remote_repo_list
)
"
=
"origin"
]
;
then
GIRARHOST
=
"origin"
fi
LISTGIRARHOST
=
"
$GIRARHOST
$(
do_exclude_list
"
$GIRARHOST
"
"
$REMOTELIST
"
)
"
fi
fi
CURRENTBRANCH
=
$(
get_current_branch
)
# if set it can be tag
# if set it can be tag
or branch name
if
[
-n
"
$1
"
]
;
then
if
[
-n
"
$1
"
]
;
then
CURRENTBRANCH
=
"
$1
"
CURRENTBRANCH
=
"
$1
"
shift
shift
else
CURRENTBRANCH
=
$(
get_current_branch
)
fi
fi
[
-n
"
$CURRENTBRANCH
"
]
||
fatal
"Can't detect current branch"
[
-n
"
$CURRENTBRANCH
"
]
||
fatal
"Can't detect current branch"
}
tune_girarlist
$LISTARGS
if
[
"
$PUSHALL
"
=
"--all"
]
;
then
if
[
"
$PUSHALL
"
=
"--all"
]
;
then
TEXTBRANCH
=
"all branches"
TEXTBRANCH
=
"all branches"
...
@@ -103,16 +119,6 @@ else
...
@@ -103,16 +119,6 @@ else
fi
fi
fi
fi
# if remote list is empty, do ginit
[
-n
"
$REMOTELIST
"
]
||
ginit
$GIRARHOST
LISTGIRARHOST
=
"
$GIRARHOST
$(
do_exclude_list
"
$GIRARHOST
"
"
$REMOTELIST
"
)
"
[
-n
"
$OVERRIDEGIRARHOST
"
]
&&
LISTGIRARHOST
=
$OVERRIDEGIRARHOST
for
i
in
$LISTGIRARHOST
;
do
for
i
in
$LISTGIRARHOST
;
do
push_to_remote
$i
push_to_remote
$i
done
done
}
do_push
$LISTARGS
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