Commit aba98777 authored by Vitaly Lipatov's avatar Vitaly Lipatov

gpush: add -f/--force support

parent f949a43d
...@@ -11,9 +11,15 @@ if [ "$1" = "-h" ] ; then ...@@ -11,9 +11,15 @@ if [ "$1" = "-h" ] ; then
exit 1 exit 1
fi fi
PUSHFORCE=
if [ "$1" = "-f" ] || [ "$1" = "--force" ] ; then
PUSHFORCE="--force"
fi
# use as project name # use as project name
if [ -n "$1" ] ; then if [ -n "$1" ] ; then
PROJECTNAME=$1 PROJECTNAME=$1
shift
else else
PROJECTNAME=$(basename `pwd`) PROJECTNAME=$(basename `pwd`)
fi fi
...@@ -28,13 +34,14 @@ fi ...@@ -28,13 +34,14 @@ fi
# more correctly # more correctly
CURRENTBRANCH=HEAD CURRENTBRANCH=HEAD
# #
if [ -n "$2" ] ; then if [ -n "$1" ] ; then
TARGETBRANCH=$CURRENTBRANCH:$2 TARGETBRANCH=$CURRENTBRANCH:$1
shift
else else
TARGETBRANCH= TARGETBRANCH=
fi fi
git push $@ $GIRARHOST:packages/$PROJECTNAME.git $TARGETBRANCH git push $@ $PUSHFORCE $GIRARHOST:packages/$PROJECTNAME.git $TARGETBRANCH
git push --tags $GIRARHOST:packages/$PROJECTNAME.git $TARGETBRANCH git push --tags $GIRARHOST:packages/$PROJECTNAME.git $TARGETBRANCH
#> $ git commit -a; A='0.23-alt1'; git tag -s $A; \ #> $ git commit -a; A='0.23-alt1'; git tag -s $A; \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment