summaryrefslogtreecommitdiff
path: root/bin/updatebuildmain
diff options
context:
space:
mode:
Diffstat (limited to 'bin/updatebuildmain')
-rwxr-xr-xbin/updatebuildmain6
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/updatebuildmain b/bin/updatebuildmain
index 54c3544..5a46ea4 100755
--- a/bin/updatebuildmain
+++ b/bin/updatebuildmain
@@ -21,6 +21,7 @@ set -e
GITPROJECT=$(basename $(pwd))
REF=${1-HEAD}
+ORIGIN=${2:-origin}
# we need to be within a working copy (base folder) and we need a <REF>!!!
test -z $1 || test -d ./.git || {
@@ -32,5 +33,6 @@ test -z $1 || test -d ./.git || {
# update the build-main branch with our newest blessed reference
git branch -d build-main &>/dev/null || true
git tag -d build-main &>/dev/null || true
-git checkout -b build-main $REF
-git push origin build-main:build-main
+git checkout -b build-main $REF || true
+git push $ORIGIN build-main:build-main
+git checkout master