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
7b88f264
Commit
7b88f264
authored
Aug 20, 2010
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gpush: add some heroustic for default behavior
parent
27822c7f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
gpush
bin/gpush
+11
-5
No files found.
bin/gpush
View file @
7b88f264
...
...
@@ -6,13 +6,13 @@ load_mod git
test
-r
"
$1
"
&&
fatal
"Do not need any files in params"
# If run with remote alias like girar name, use only it
if
is_girar_name
$1
;
then
GIRARHOST
=
$1
OVERRIDEGIRARHOST
=
$1
shift
fi
if
[
"
$1
"
=
"-h"
]
;
then
echo
"gpush - publish current project repo remote git repo"
echo
"Use: gpush [GIRAR] [-f|--force] [-a|--all] [-t|--tags] [target branch]"
...
...
@@ -39,11 +39,10 @@ fi
REMOTELIST
=
"
$(
get_remote_git_list
)
"
#
disable
use one target if it one
if
false
&&
is_one_girar_name
"
$REMOTELIST
"
;
then
# use one target if it one
if
is_one_girar_name
"
$REMOTELIST
"
&&
[
-z
"
$OVERRIDEGIRARHOST
"
]
;
then
GIRARHOST
=
"
$REMOTELIST
"
OVERRIDEGIRARHOST
=
$GIRARHOST
shift
fi
# use as project name
...
...
@@ -61,7 +60,7 @@ if [ -z "$CURRENTBRANCH" ] ; then
exit
1
fi
if
[
"
$1
"
=
"origin"
]
;
then
if
[
"
$1
"
=
"origin"
]
;
then
REPO
=
"
$1
"
shift
git push
$PUSHALL
$PUSHFORCE
$REPO
$@
...
...
@@ -69,6 +68,13 @@ if [ "$1" = "origin" ] ; then
exit
fi
if
[
"
$(
git remote |
uniq
)
"
=
"origin"
]
;
then
REPO
=
"origin"
git push
$PUSHALL
$PUSHFORCE
$REPO
$@
git push
--tags
$PUSHALL
$PUSHFORCE
$REPO
$@
exit
fi
if
[
-n
"
$1
"
]
;
then
TARGETBRANCH
=
"
$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