1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-02 03:50:36 +00:00

Add autosync.sh

This commit is contained in:
Luke Ceddia 2019-01-06 15:56:56 +11:00
parent 5ec076edce
commit cb3e75ae98
2 changed files with 29 additions and 1 deletions

View file

@ -6,4 +6,4 @@ appveyor.yml
setup_win.bat
qb64/internal/c/mingw32
qb64/internal/c/mingw64
autosync.sh

28
autosync.sh Normal file
View file

@ -0,0 +1,28 @@
#!/bin/bash
# This script reproduces any commits on upstream to the given remotes, but only on the given branches.
# It is intended to be run via a cron job or similar.
# The merge is --ff-only, so the target branches must not have anything else adding commits to them.
set -e
cd ~/qb64
# Adding a new branch/remote? git checkout -b $remote-$branch $remote/$branch to create a new local.
BRANCHES='development'
REMOTES='origin fellippe qb64team'
git fetch upstream
for branch in $BRANCHES; do
for remote in $REMOTES; do
git checkout -q $remote-$branch
git merge -q --ff-only upstream/$branch
done
done
for remote in $REMOTES; do
refspecs=
for branch in $BRANCHES; do
refspecs="$refspecs $remote-$branch:$branch"
done
git push -q $remote $refspecs
done