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
d681811d
Commit
d681811d
authored
Jul 14, 2010
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gpush: drop timeout using, disable push --tags by default (only with -t/--tags option)
parent
74bfe88b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
10 deletions
+18
-10
gpush
bin/gpush
+18
-10
No files found.
bin/gpush
View file @
d681811d
...
...
@@ -8,7 +8,7 @@ test -r "$1" && fatal "Do not need any files in params"
if
[
"
$1
"
=
"-h"
]
;
then
echo
"gpush - publish current project repo remote git repo"
echo
"Use: gpush [-f|--force] [-a|--all] [GEAR] [target branch]"
echo
"Use: gpush [-f|--force] [-a|--all] [
-t|--tags] [
GEAR] [target branch]"
exit
1
fi
...
...
@@ -24,6 +24,12 @@ if [ "$1" = "-a" ] || [ "$1" = "--all" ] ; then
shift
fi
TAGSALL
=
if
[
"
$1
"
=
"-t"
]
||
[
"
$1
"
=
"--tags"
]
;
then
TAGSALL
=
"--tags"
shift
fi
REMOTELIST
=
"
$(
get_remote_git_list
)
"
if
is_girar_name
$1
;
then
...
...
@@ -63,7 +69,7 @@ if [ "$1" = "origin" ] ; then
fi
if
[
-n
"
$1
"
]
;
then
TARGETBRANCH
=
$CURRENTBRANCH
:
$1
TARGETBRANCH
=
"
$1
"
shift
else
TARGETBRANCH
=
$CURRENTBRANCH
...
...
@@ -74,20 +80,25 @@ if [ "$PUSHALL" = "--all" ] ; then
TARGETBRANCH
=
else
TEXTBRANCH
=
"branch
$TARGETBRANCH
"
if
echo
$TEXTBRANCH
| egrep
"alt|eter"
;
then
TEXTBRANCH
=
"tag
$TARGETBRANCH
"
fi
fi
push_to_remote
()
{
local
GHOST
=
$1
local
TEXTTAG
=
[
-n
"
$TAGSALL$PUSHALL
"
]
&&
TEXTTAG
=
"(with all tags)"
echo
echo
"** Push
$TEXTBRANCH
from
$PROJECTNAME
.git to
$GHOST
:packages/
$PROJECTNAME
.git"
echo
"** Push
$TEXTBRANCH
from
$PROJECTNAME
.git to
$GHOST
:packages/
$PROJECTNAME
.git
$TEXTTAG
"
# FIXME: push with one command
if
[
-n
"
$PUSHALL
"
]
;
then
timeout
$SSHTIMEOUT
git push
$PUSHALL
$PUSHFORCE
$GHOST
:packages/
$PROJECTNAME
.git
timeout
$SSHTIMEOUT
git push
--tags
$GHOST
:packages/
$PROJECTNAME
.git
git push
$PUSHALL
$PUSHFORCE
$GHOST
:packages/
$PROJECTNAME
.git
&&
[
-n
"
$TAGSALL
"
]
&&
git push
--tags
$GHOST
:packages/
$PROJECTNAME
.git
else
timeout
$SSHTIMEOUT
git push
$PUSHALL
$PUSHFORCE
$GHOST
:packages/
$PROJECTNAME
.git
$TARGETBRANCH
timeout
$SSHTIMEOUT
git push
--tags
$GHOST
:packages/
$PROJECTNAME
.git
$TARGETBRANCH
git push
$PUSHALL
$PUSHFORCE
$GHOST
:packages/
$PROJECTNAME
.git
$TARGETBRANCH
&&
[
-n
"
$TAGSALL
"
]
&&
git push
--tags
$GHOST
:packages/
$PROJECTNAME
.git
$TARGETBRANCH
fi
}
...
...
@@ -100,6 +111,3 @@ LISTGIRARHOST="$GIRARHOST $(do_exclude_list "$GIRARHOST" "$REMOTELIST")"
for
i
in
$LISTGIRARHOST
;
do
push_to_remote
$i
done
#> $ git commit -a; A='0.23-alt1'; git tag -s $A; \
#> git tag -s -f -m 'Sisyphus release $A' sisyphus $A
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