Commit e37c21ac authored by Vitaly Lipatov's avatar Vitaly Lipatov

gpush: improve: push master by default, add -a|--all support

parent ac1b00f2
...@@ -7,13 +7,20 @@ ...@@ -7,13 +7,20 @@
if [ "$1" = "-h" ] ; then if [ "$1" = "-h" ] ; then
echo "gpush - publish current project repo to $GIRARHOST" echo "gpush - publish current project repo to $GIRARHOST"
echo "Use: gpush [project name] [target branch]" echo "Use: gpush [-f|--force] [-a|--all] [project name] [target branch]"
exit 1 exit 1
fi fi
PUSHFORCE= PUSHFORCE=
if [ "$1" = "-f" ] || [ "$1" = "--force" ] ; then if [ "$1" = "-f" ] || [ "$1" = "--force" ] ; then
PUSHFORCE="--force" PUSHFORCE="--force"
shift
fi
PUSHALL=
if [ "$1" = "-a" ] || [ "$1" = "--all" ] ; then
PUSHALL="--all"
shift
fi fi
# use as project name # use as project name
...@@ -39,9 +46,10 @@ if [ -n "$1" ] ; then ...@@ -39,9 +46,10 @@ if [ -n "$1" ] ; then
shift shift
else else
TARGETBRANCH= TARGETBRANCH=
[ -n "$PUSHALL" ] || TARGETBRANCH=master
fi fi
git push $@ $PUSHFORCE $GIRARHOST:packages/$PROJECTNAME.git $TARGETBRANCH git push $PUSHALL $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