Commit 6a6fbeb6 authored by Vitaly Lipatov's avatar Vitaly Lipatov Committed by Vitaly Lipatov

gpush: add -f/--force support

parent 2b1f6bcd
......@@ -11,9 +11,15 @@ if [ "$1" = "-h" ] ; then
exit 1
fi
PUSHFORCE=
if [ "$1" = "-f" ] || [ "$1" = "--force" ] ; then
PUSHFORCE="--force"
fi
# use as project name
if [ -n "$1" ] ; then
PROJECTNAME=$1
shift
else
PROJECTNAME=$(basename `pwd`)
fi
......@@ -28,13 +34,14 @@ fi
# more correctly
CURRENTBRANCH=HEAD
#
if [ -n "$2" ] ; then
TARGETBRANCH=$CURRENTBRANCH:$2
if [ -n "$1" ] ; then
TARGETBRANCH=$CURRENTBRANCH:$1
shift
else
TARGETBRANCH=
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 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