mirror of
https://github.com/QB64Official/qb64.git
synced 2024-07-05 15:50:25 +00:00
Add autosync.sh
This commit is contained in:
parent
5ec076edce
commit
cb3e75ae98
|
@ -6,4 +6,4 @@ appveyor.yml
|
||||||
setup_win.bat
|
setup_win.bat
|
||||||
qb64/internal/c/mingw32
|
qb64/internal/c/mingw32
|
||||||
qb64/internal/c/mingw64
|
qb64/internal/c/mingw64
|
||||||
|
autosync.sh
|
||||||
|
|
28
autosync.sh
Normal file
28
autosync.sh
Normal 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
|
Loading…
Reference in a new issue